10

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

Chris F
  • 14,337
  • 30
  • 94
  • 192

1 Answers1

20
disconnect-viserver -confirm:$false

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

noam
  • 1,914
  • 2
  • 20
  • 26
  • 1
    I had been trying the standard powershell `-Force` but getting nowhere. I wonder if this is a PowerCLI specific switch. – lantrix Sep 24 '15 at 02:16