Setting time on ESXi hosts through PowerCLI | Geaux Virtual

Excellent powershell to set the correct time on a number of hosts…

I expanded the code to:

Get-Cluster -Name “Cluster” | Get-VMHost | Where-Object {

$t = Get-Date
$dst = $_ | %{ Get-View $_.ExtensionData.ConfigManager.DateTimeSystem }
$dst.UpdateDateTime((Get-Date($t.ToUniversalTime()) -format u))
}

via Setting time on ESXi hosts through PowerCLI | Geaux Virtual.

Leave a Comment