This content has been marked as final. Show 3 replies
I don't think you can schedule a vm for remediation on reboot. But in vSphere 5.1 you can schedule a vm for hardware upgrade with:
$vm = Get-VM -Name MyVM $spec = New-Object -TypeName VMware.Vim.VirtualMachineConfigSpec $spec.ScheduledHardwareUpgradeInfo = New-Object -TypeName VMware.Vim.ScheduledHardwareUpgradeInfo $spec.ScheduledHardwareUpgradeInfo.UpgradePolicy = "onSoftPowerOff" $spec.ScheduledHardwareUpgradeInfo.VersionKey = "vmx-09" $vm.ExtensionData.ReconfigVM_Task($spec)
The above script will schedule a vm called MyVM for an upgrade to hardware version 9 on a soft power off.