Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I run disconnect-viserver with no prompt in PowerCLI

How can I disable the prompt when using the following cmdlet to disconnect from a server in PowerCLI? The help file shows a -Confirm option, which I don't use, so I'm inferring from this that without it, there should be NO prompt, but I still get prompted?

disconnect-viserver -server MyServer

Thanks

like image 493
Chris F Avatar asked Apr 09 '13 19:04

Chris F


1 Answers

disconnect-viserver -confirm:$false

As you notice, omitting the Confirm parameter is equivalent to -Confirm:$true

like image 61
noam Avatar answered Oct 19 '22 11:10

noam