PowerShell – Command Line – Differences between double-quote and single-quote

Background Want to quickly touch on one of the differences between how PowerShell processes double and single quotes.   Scenario Command Line Double-Quotes Versus Single Quotes Syntax Sample Double Quotes Sample Output Output - Image Output - Text Explanation Issuing the command " pwsh -Command "$PSVersionTable" " returns an empty output   Single Quotes Sample … Continue reading PowerShell – Command Line – Differences between double-quote and single-quote

PowerShell – Command Line – Error – “Cannot process argument transformation on parameter – value of type “System.String” to type “System.Management.Automation.ParameterAttribute”

Background Want to quickly touch on an error that I stumbled upon this morning. Error Error Image Error Text   Code Erroring Code Code Correction Parameter - Property - Mandatory is False Outline For parameter flag Supply property name and value In our case Mandatory is false As we are setting a default value for … Continue reading PowerShell – Command Line – Error – “Cannot process argument transformation on parameter – value of type “System.String” to type “System.Management.Automation.ParameterAttribute”

PowerShell:- Pass By Reference & Command Line Arguments

Background I have a small networking project that I am working on. There are ways to get data via tools, but I will like to examine how I can get identical data via scripts. And, so here I googled on certain keywords. Found a very worthy sample code. But, also saw that a bit more … Continue reading PowerShell:- Pass By Reference & Command Line Arguments

Powershell – Parameters (Command Line)

Background Back on this Microsoft Powershell grind.  Need to do a quick script. But, really stumbling.... For instance, I will like to formalize my command line parameters.  Have clean well defined names for them. In most programming languages you end up with dummied-down numbered augment list i.e. %1 %2, etc. But, PowerShell supports named command … Continue reading Powershell – Parameters (Command Line)