Davoud Teimouri

Virtualization & Datacenter

[Script]: Check Time Synchronization with Host on Virtual Machines – PowerCLI

How to Check Time Synchronization with Host on Virtual Machines via PowerCLI

As you know, virtual machines can sync their time with ESXi host when VMware Tools is installed on the virtual machines. Also the configuration should be enabled on virtual machine configuration manually. The configuration is available on “Virtual Machine Properties”:

VMware Tools - Synchronize guest with host

VMware Tools – Synchronize guest with host

If there is more than one virtual machine (Absolutely YES), the configuration should be enabled via an automation solution such as PowerCLI because enabling the configuration manually is very difficult.

As all virtual machines don’t need to this configuration for time synchronization, administrators enables the configuration for some VMs when it needed. Some times, administrators have to provide a report from the virtual machines which have the configuration enabled.

So how an administrator be able to create a query from the virtual machine.

The stupid solution is checking virtual machine via GUI one by one. But true solution is create query from virtual machine via an automation tools such as PowerCLI

The Script!

Administrator can run the below PowerCLI script to find the virtual machines with “Synchronize guest time with host” configuration:

CSV output will be available by run adding the below line to the script:

The {File Path} should be changed with actual file path for storing the information as CSV file.

More on Tiemouri.Net

VMware Tools Client – Interact with a VM without Network Connectivity

Add existing virtual desktops to “Automated Pool” in VMware View manually

Add SATA drives to ESXi 5

Update VMware Tools Automatically

Run ESXi Commands Via PowerShell And SSH

11,655 total views, 15 views today

[Script]: Check Time Synchronization with Host on Virtual Machines – PowerCLI
5 (100%) 3 Votes

Davoud Teimouri is as a professional blogger, vExpert 2015/2016/2017/2018, VCA, MCITP. This blog is started with simple posts and now, it has large following readers.

Updated: 28/03/2018 — 8:46 am

Leave a Reply

Your email address will not be published. Required fields are marked *

Teimouri.net © 2012 Frontier Theme
Read previous post:
vSAN ReadyNode Configurator - vSAN OEM
[Review]: What’s vSAN ReadyNode?

vSAN ReadyNode are x86 servers, available from all the leading server vendors, that have been pre-configured, tested and certified for...

Close