PowerCLI

 View Only
  • 1.  Disconnect-VIServer keeps prompting for Confirm

    Posted Sep 14, 2017 12:25 PM

    Newbie here:

    I am using the latest CLI as of 3 weeks ago.  I have tried all sorts of combinations based upon the help pages..

    Disconnect-VIServer -Server * -Force - Confim $false

    The above command still forces a dialog prompt to ask if I want to disconnect for each server or I can click on "No to All".

    Thanks, Stu



  • 2.  RE: Disconnect-VIServer keeps prompting for Confirm
    Best Answer

    Posted Sep 14, 2017 12:36 PM

    Hi Stuart,

    Try this: Disconnect-VIServer -Confirm:$False



  • 3.  RE: Disconnect-VIServer keeps prompting for Confirm

    Posted Sep 14, 2017 12:36 PM

    Disconnect-VIServer -Server * -Force -Confirm:$false

    works for me.


    André



  • 4.  RE: Disconnect-VIServer keeps prompting for Confirm

    Posted Sep 14, 2017 12:54 PM

    I missed the:

    -Server * -Force

    Andre is right :smileyhappy: Lack of sleep!



  • 5.  RE: Disconnect-VIServer keeps prompting for Confirm

    Posted Sep 14, 2017 12:54 PM

    I had not tried the colon approach. Thanks!