VMware Cloud Community
Andy_Imm
Contributor
Contributor
Jump to solution

Power down a VM without being prompted

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

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Add the -confirm option

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


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Add the -confirm option

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


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Andy_Imm
Contributor
Contributor
Jump to solution

LucD,

Once again you helped me stumble thru this.

Thanks again.

Andrew

0 Kudos