VMware Cloud Community
ITTech2002
Contributor
Contributor
Jump to solution

Virutal Machine Startup/Shutdown - Settings on ESX Host

Hello,

Using a powershell script I would like to change the "Virutal Machine Startup/Shutdown" settings on many ESX Hosts at one time.

I need to change the following:

  1. Check or enable "Allow virutal machines to start and stop automatically with the system"

  2. And change the Shutdown Action to Suspend.

Do you have the know how?

Tim

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

And if you want to do this for all your ESX servers, you could do

Get-VMHost | Get-VMHostStartPolicy | Set-VMHostStartPolicy -Enabled:$true --StopAction Suspend


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

View solution in original post

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

That can be done with the Set-VMHostStartPolicy cmdlet.

$policy = Get-VMHostStartPolicy -VMHost <ESX-name>
Set-VMHostStartPolicy -VMHostStartPolicy $policy -Enabled:$true -StopAction Suspend


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

LucD
Leadership
Leadership
Jump to solution

And if you want to do this for all your ESX servers, you could do

Get-VMHost | Get-VMHostStartPolicy | Set-VMHostStartPolicy -Enabled:$true --StopAction Suspend


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

Reply
0 Kudos
ITTech2002
Contributor
Contributor
Jump to solution

Thanks much! That is a simple fix.... Thanks again.

Reply
0 Kudos