PowerShell Variables in PowerShell Simple variable


Example

All variables in powershell begin with a US dollar sign ($). The simplest example of this is:

$foo = "bar"

This statement allocates a variable called foo with a string value of "bar".