1 # Print current environment (i.e. export)
   2 Get-ChildItem Env:
   3 
   4 # Equivalent of UNIX `which`
   5 (Get-Command which).Path
   6 
   7 # Prevent a PowerShell script from quitting so you can read error messages
   8 powershell.exe -File Blah.ps1 -NoExit

Choco

   1 # These must be done from an admin shell!
   2 # Upgrade all currently installed packages
   3 choco upgrade all -y


CategoryCheatSheet