Windows time
Fri, Apr 15, 2016 · 2 minute readwindows
In a Windows domain environment connected PC’s will usually get their time from a domain controller.
If the time on the DC is wrong then so is the time on all connected PC’s.
Checking and correcting Windows DC time can be done in Powershell.
One word of warning - if your server time is fast (as mine was) then take care resetting it as a sudden jump back in time can affect some applicaitons.
# Check current status
PSH> w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 1 (primary reference - syncd by radio clock)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0000000s
Root Dispersion: 10.0000000s
ReferenceId: 0x4C4F434C (source name: "LOCL")
Last Successful Sync Time: 4/14/2016 6:40:37 PM
Source: Local CMOS Clock
Poll Interval: 6 (64s)
# Source is local clock which is not good as clock will drift over time.
# Change local time to use remote time servers, preferably more than one.
PSH> w32tm /config /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org" /syncfromflags:MANUAL
The command completed successfully.
# Restart the time service
PSH> Stop-Service w32time
PSH> Start-Service w32time
# Recheck time, now coming from a remote service
PSH> w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 3 (secondary reference - syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0000000s
Root Dispersion: 10.0000000s
ReferenceId: 0x5FD584FA (source IP: 95.213.132.250)
Last Successful Sync Time: 4/14/2016 6:27:37 PM
Source: 0.pool.ntp.org
Poll Interval: 6 (64s)