Secret Parameter Alias Names

by Jan 20, 2010

It is important to note that cmdlet parameters can have assigned alias names. They are not always easy to find but they are there. This is why you can say -ea instead of -errorAction. Use this code to locate the alias parameter names of any cmdlet:

'Get-Childitem' |
Foreach-Object {
(get-command $_).parameters |
% { $_.Values |
Where-Object { $_.Aliases.Count -gt 0 } |
Select-Object Name, Aliases

You can accomplish this by simply replacing the name of the cmdlet you want to examine at the start of the pipeline.

Twitter This Tip! ReTweet this Tip!