Description:

Variables:

$location ="East Asia"
$cred = Get-Credential

Loops:

  • Comparision ops:
    • -lt: less than
    • -le: less than or equal
    • -eq: equal
    • -ne: not equal
  • For:
    •   For($i=1, $i -lt 3, $i++)
        {
        	$i
        }
  • Do…While:

  • For..each
    • s

Parameters

  • Declare as argument
    •   param([int] $size, [string] $location)
  • When calling script:
    •  
    .\exampleScript.ps1 -size 5 -location “East Asia”
    •  
    .\exampleScript.ps1 5 “East Asia”