VMware Cloud Community
yoda2013
Contributor
Contributor
Jump to solution

Help with PowerCLI parameter to configure Power Management settings on Guest VM

I am trying to find the setting to use to put my Windows VMs Power Management on Standby Mode (instead of default "Suspend"). Please see attached image. I am looking for the parameters/properties that control and manage the settings shown on the image to use in my PowerCLI script. Specifically, what new object I need to create to take care of this. Any help highly appreciated.

Thanks very much.

</krish>

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Try like this

$vmName = 'MyVM'

$vm = Get-VM -Name $vmName


$spec = New-Object VMware.Vim.VirtualMachineConfigSpec

$spec.PowerOpInfo = New-Object VMware.Vim.VirtualMachineDefaultPowerOpInfo

$spec.PowerOpInfo.StandbyAction = 'checkpoint'


$vm.ExtensionData.ReconfigVM($spec)


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

View solution in original post

Reply
0 Kudos
3 Replies
scott28tt
VMware Employee
VMware Employee
Jump to solution

Moderator: Moved to PowerCLI

This is the 2nd thread of yours that I’ve moved to the PowerCLI area.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Try like this

$vmName = 'MyVM'

$vm = Get-VM -Name $vmName


$spec = New-Object VMware.Vim.VirtualMachineConfigSpec

$spec.PowerOpInfo = New-Object VMware.Vim.VirtualMachineDefaultPowerOpInfo

$spec.PowerOpInfo.StandbyAction = 'checkpoint'


$vm.ExtensionData.ReconfigVM($spec)


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

Reply
0 Kudos
yoda2013
Contributor
Contributor
Jump to solution

Thanks LucD. That was exactly the setting I was looking for.

I tried it and it worked correctly. Much appreciated

Sincerely,

Krish.

Reply
0 Kudos