Last active
October 3, 2018 13:21
-
-
Save shaneis/cdb1936572b1446ca39e70d093c67213 to your computer and use it in GitHub Desktop.
How to set parameter aliases
This file contains 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
<# | |
function name | |
comment based help | |
etc | |
etc | |
#> | |
param( | |
[parameter(position = 1, | |
parametersetname = 'id')] | |
[string]$Identity, | |
[parameter(position = 1, | |
parametersetname = 'filter')] | |
[Alias('l')] # <-- LDAPFilter? Just type 'l' | |
[string]$LDAPFilter, | |
[parameter(position = 2)] | |
[Alias('p')] | |
[string[]]$Properties, # <-- Properties? Nah, type 'p' | |
[validateset('list','table')] | |
[Alias('f')] | |
[string]$Format = 'list' # <-- Format? Pfft! Try 'f' | |
) | |
<# | |
The rest of the code | |
#> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment