[Script]: Check Time Synchronization with Host on Virtual Machines – 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”:
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:
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