c# - Calling a cmdlet via a value -
My psm1 file contains a variable that is a KVP hash
$ subcmdlist = @ { "Adhost" = "Ad-Host"; "Delete" = "remove-host"; "Set parameter" = "set parameter"; }
This psm1 file also has a function called 'new task' which accepts the $ subcommand argument.
I wonder how the cmdlet add-host
the new task adhost
has been released from the shell.
I tried to resonate it, but he did not do that very good value is printed.
Thank you!
& amp; ;
Sign (aka call operator), like this: & amp; "Nights-host"
. It works at least in Powershell 3.0
Comments
Post a Comment