Powershell cheat sheet references

Variables

# Define variables with a value
$MyVariable = 1, 2, 3
$path = "C:\Windows\System32"

# Store results of commands in variables
$processes = Get-Process
$Today = (Get-Date).date

# Unset a value
$MyVariable = $null

# Remove a variable
remove-variable -name MyVariable

# List variables
get-variable