cheatsheet

Cheatsheat for Powershell

Comment # This is a comment in a Powershell script
print Write-Host "Hello World!"
Arguments param(
[int]$p1,
[string]$p2,
)
if If (condition) {# Do stuff} Else {# Do other stuff}
for for ($i=1; $i -le 10; $i++) {# Do stuff}
while while(($i -ne 0){# Do stuff}
function function my-f{
Param(
$p1,
$p2

)

# Do stuff
return 0
}

function call my-f P1 P2
Exit Exit()