#PSTip PowerShell command-line switch shortcuts

Note: This tip requires PowerShell 2.0 or above.

Windows PowerShell allows you to create short names for commands using Aliases. It even allows you to specify short parameter names. Powershell.exe and powershell_ise.exe also have a set of switches to allow you to customize the session of each one, and some of them support short names. The following tables lists those switches and their short version(s) (some have more than one). Note that only switches that have shortcuts are listed.

PowerShell.exe

meterShortcut(s)
Commandc
EncodedArgumentsea,encodeda
EncodedCommande,ec
ExecutionPolicyex,ep
Filef
Help-h,-? or /h,/?
InputFormati,if
NoExitnoe
NoLogonol
NoProfilenop
NonInteractivenoni
OutputFormato,of
Stas
WindowStylew

powershell_ise.exe

ParameterShortcut(s)
Filef
Help-h,-? or /h,/?
Mtam
NoProfilen
Share on: