How to check which virtual machines have vmware tools time sync enabled

by Grzegorz Kulikowski

If we would like to quickly see which virtual machines have the option to sync time using vmware tools enabled we can use this one liner:
[sourcecode language=”powershell”]
get-view -viewtype virtualmachine -Filter @{‘Config.Tools.SyncTimeWithHost’=’True’} | select name
After this you will receive a list with VM name that have their vm tools time sync enabled.
One more thing that is worth reading while thinking about virtual machine tools time synchronization is this:
Disabling Time Synchronization (1189)

And some more information about troubleshooting esx/esxi host system regarding ntp.
Troubleshooting NTP on ESX and ESXi (1005092)
If you would like to change policy for vm tools time sync you can see how i was changing the vmware tools upgrade policy and just change 1 line in the code:
from:$ = “upgradeAtPowerCycle”
to:$ = $true // or $false
And this will do the trick.

You may also like

1 comment

Ranj July 3, 2014 - 1:05 pm

Hi The powershell that is written there to check which VMs have time sync enabled, I managed to run this script, is there a powershell so I can batch disable all VMs time sync to disabled?



Leave a Reply

Chinese (Simplified)EnglishFrenchGermanHindiPolishSpanish