#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.


meter Shortcut(s)
Command c
EncodedArguments ea,encodeda
EncodedCommand e,ec
ExecutionPolicy ex,ep
File f
Help -h,-? or /h,/?
InputFormat i,if
NoExit noe
NoLogo nol
NoProfile nop
NonInteractive noni
OutputFormat o,of
Sta s
WindowStyle w


Parameter Shortcut(s)
File f
Help -h,-? or /h,/?
Mta m
NoProfile n


Share on: 
comments powered by Disqus