Variables
Define a variable
$var_name
Set-Variable -Name "myVar" -value "value of variable"
New-Variable -Name "myVar" -value "value of variable"
${ complex variable name} = "value"
Here-String
$str = @"
The character " is treated as a character and this string.
Variable will get expanded.
"@
$str = @'
Variable in this string will not get expanded.
'@
Constant
Set-Variable test -option Constant -value 100
Set-Variable test -option ReadOnly -value 100
Scope
$local_variable
$global:Global_Variable
Check type
$var -is [int]
$var -is [String]
Clear a variable
Clear-variable $myVar
Remove a variable
Remove-variable $myVar