In this post you will learn how to change the VMware Tools settings in the Options menu which you can find in the vSphere Client:
You can enable or disable these features via the following PowerCLI script:
$vCenter = Read-Host "Enter vCenter Server name" Connect-VIServer $vCenter $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec $vmConfigSpec.Tools = New-Object VMware.Vim.ToolsConfigInfo $vmConfigSpec.Tools.AfterPowerOn = $true $vmConfigSpec.Tools.AfterResume = $true $vmConfigSpec.Tools.BeforeGuestStandby = $true $vmConfigSpec.Tools.BeforeGuestShutdown = $true $vmConfigSpec.Tools.SyncTimeWithHost = $true $vmConfigSpec.Tools.ToolsUpgradePolicy = "Manual" # "UpgradeAtPowerCycle" Get-VM | % { (Get-View $_.ID).ReconfigVM($vmConfigSpec)} Disconnect-VIServer -Confirm:$false
Just change the $true values to $false if you want to disable the feature. If you want to change the Tools Upgrade Policy to Upgrade at startup just remove "Manual" # and it should change the Policy.
This is what you see when the VM is still active:
This script will change the configured settings on All the VM’s. If you want to change the settings on a particular VM just change Get-VM into Get-VM vmname
Will this also work on the esx 3.5?
Yes it will work on ESX 3.5. Actually, I have tested this script on it.
Do the VMs need to be in “power off” state to apply these settings via PowerCLI??
No, the setting will be applied even when the VM’s are powered on