PowerShell – Parameter Name aliases

Parameter Name aliases in PowerShell provides an option to give the shortest aliases name for the parameters. For instance, for most of the cmdlets will be engaging with -computername this can be re-written in aliases as -cn

PS C:UsersM.Karthikeyan> (get-command get-eventlog |
select -ExpandProperty parameters)

The above command will list out the available parameters for get-eventlog cmdlet

PS C:UsersM.Karthikeyan> (get-command get-eventlog |
select -ExpandProperty parameters).computername.aliases Cn

For instance, normal cmdlets can be rewritten as

get-eventlog -Cn localhost  -LN System  -Newest 10