Created
August 3, 2015 15:59
-
-
Save JohnRoos/fa5149db3d18c215a40b to your computer and use it in GitHub Desktop.
Get parameter alias
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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