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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -