Today, the first time for a long while, I am again in the need to make a scheduled shutdown of a physical ESXi server. Strangely it seems that this function disappeared out of the vSphere Client. I'm pretty sure, it worked with one of the first VirtualCenter versions. But after a bit...
The following PowerCLI script will schedule a vm called MyVM to be compatible with "ESXi 5.1 and later" and it will enable "Only upgrade after normal guest OS shutdown". $vm = Get-VM -Name MyVM $vm.ExtensionData.Config.ScheduledHardwareUpgradeInfo $spec = New-Object -TypeName VMware....