The idea was to have a powershell script that checks the time on the NTP, Times on all the ESX hosts and times on all the Window servers.
We can then see if there are any time slips happening by comparing the NTP and device times.
I have the powershell NTP and windows servers sorted.
When I look at the Time of an Esx from within the Virtual Centre the time displays correctly
When I use the Powercli command to get the time its around 1 hour behind.
So first thought is its British Summer Time ?
Get-EsxCli -VMHost {hostname}).System.Time.get()
The NTP Returns 08:37:59
The ESX Returns 07:38:00
So my check says hang on, its an hour out ?
I could add 60 Minutes but then it will fail when we change back to British Winter time ?
Any idea's on best way to approach this one ?
Cheers
Aidey
The esxcli command indeed returns the time in UTC.
To convert to local time, you could do
([DateTime]($esxcli.System.Time.get())).ToLocalTime()
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The esxcli command indeed returns the time in UTC.
To convert to local time, you could do
([DateTime]($esxcli.System.Time.get())).ToLocalTime()
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Many thanks LucD
That works perfect for what I want to do.
Cheers
Aidey