Automation

 View Only
  • 1.  Power down a VM without being prompted

    Posted Mar 28, 2008 05:34 PM

    Guru's,

    When I run the following command, I am prompted if I want to power the VM down. I do not want to be prompted for power off since this is going to be scripted.

    get-vmhost esx11 | get-vm | stop-vm

    I get prompted to power off the vm.

    Thanks



  • 2.  RE: Power down a VM without being prompted
    Best Answer

    Posted Mar 28, 2008 05:40 PM

    Add the -confirm option

    get-vmhost esx11 | get-vm | stop-vm -confirm:$false



  • 3.  RE: Power down a VM without being prompted

    Posted Mar 28, 2008 05:56 PM

    LucD,

    Once again you helped me stumble thru this.

    Thanks again.

    Andrew