You can schedule VM compatibility upgrade with PowerCLI. 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-NameMyVM$vm.ExtensionData.Config.ScheduledHardwareUpgradeInfo$spec=New-Object-TypeNameVMware.Vim.VirtualMachineConfigSpec$spec.ScheduledHardwareUpgradeInfo =New-Object-TypeNameVMware.Vim.ScheduledHardwareUpgradeInfo$spec.ScheduledHardwareUpgradeInfo.UpgradePolicy ="onSoftPowerOff"$spec.ScheduledHardwareUpgradeInfo.VersionKey ="vmx-09"$spec.ScheduledHardwareUpgradeInfo.ScheduledHardwareUpgradeStatus ="pending"$vm.ExtensionData.ReconfigVM_Task($spec)
You can check the scheduled VM compatibility upgrade for all your vm's with:
Get-VM |Select-Object-Property Name, @{N="UpgradePolicy";E={$_.ExtensionData.Config.ScheduledHardwareUpgradeInfo.UpgradePolicy}}, @{N="VersionKey";E={$_.ExtensionData.Config.ScheduledHardwareUpgradeInfo.VersionKey}}, @{N="ScheduledHardwareUpgradeStatus";E={$_.ExtensionData.Config.ScheduledHardwareUpgradeInfo.ScheduledHardwareUpgradeStatus}}, @{N="Fault";E={$_.ExtensionData.Config.ScheduledHardwareUpgradeInfo.Fault}}, @{N="DynamicType";E={$_.ExtensionData.Config.ScheduledHardwareUpgradeInfo.DynamicType}}, @{N="DynamicProperty";E={$_.ExtensionData.Config.ScheduledHardwareUpgradeInfo.DynamicProperty}}|Format-Table
Message was edited by: RvdNieuwendijk Added the screenshot