Skip to content

Instantly share code, notes, and snippets.

@JohnRoos
Created August 3, 2015 15:59
Show Gist options
  • Save JohnRoos/fa5149db3d18c215a40b to your computer and use it in GitHub Desktop.
Save JohnRoos/fa5149db3d18c215a40b to your computer and use it in GitHub Desktop.
Get parameter alias
# Enter the cmdlet you want to see parameter variables for:
$cmdlet = 'Get-Process'
$out = @{}
foreach ( $param in (get-command $cmdlet).Parameters.Keys ){
$aliases = ''
foreach ( $a in $cmd.Parameters.$param.Aliases ){
$aliases += "$a "
}
$out.Add($cmd.Parameters.$param.Name, $aliases)
}
$out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment