I ran across this command somewhere and it’s really useful for the vCloud hosted environment where your tenants never upgrade their tools. Of course you have to be allowed upgrade the tools make sure your not breaking your SLA or service contract by doing this. Here is the command:
Foreach ($v in (get-vm)) { $vm = $v | Get-View $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec $vmConfigSpec.Tools = New-Object VMware.Vim.ToolsConfigInfo $vmConfigSpec.Tools.ToolsUpgradePolicy = "UpgradeAtPowerCycle" $vm.ReconfigVM($vmConfigSpec) }