Finding Aliases for PowerShell Cmdlet Parameters

Many PowerShell cmdlet parameters have aliases such as “Cn” for ComputerName. These aliases aren’t well documented and even viewing the full help for a cmdlet doesn’t show them. The following command can be used to display a list of all the parameters for a particular PowerShell cmdlet and any aliases that exist for those parameters:

One thing to keep in mind is this is a list of all the parameters from all parameter sets which means some of them are mutually exclusive and can’t be used with one another.

If you only want to display the parameters that have aliases, add the Where-Object cmdlet to the command and test to see if aliases is true:

Here’s a parameterized script with a mandatory parameter for the cmdlet name and an optional parameter for the parameter name:

Running the script without at least specifying the mandatory parameter will prompt for it. Specifying only a cmdlet name returns all parameters and any aliases that exist for them:

Specifying the cmdlet and parameter name only returns that particular parameter and the aliases for it if any exist:

Update 08/30/12
The full help in PowerShell version 3 does show parameter aliases. The aliases for a specific parameter can be viewed using Help CmdletName -Parameter ParameterName:


Leave a Reply

%d bloggers like this: