Set Windows Clock to Match the Time of Another Host

Open an elevated command prompt.

w32tm /stripchart /computer:<target> /samples:<number> /dataonly

Then enter the host that you want to imitate in <target> and the number of samples that you want the target computer to return for <number>.

(Optionally) You may choose to sync with a manual peer list.

To do so:

w32tm /config /manualpeerlist:<peers> /syncfromflags:manual /reliable:yes /update

<peers> Specifies the list of DNS names or IP addresses for the NTP time source with which the PDC emulator synchronizes. (This list is referred to as the manual peer list.) For example, you can specify time.windows.com as the NTP time server. When you specify multiple peers, use a space as the delimiter and enclose the names of the peers in quotation marks.

Source: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc731191(v=ws.10)

I had an issue with the DC not having the correct time. It was off by about 4 minutes and as any IT pro would well know that a clock that is off can wreak havoc on your network. Everything relies on synchronized clocks.

Logged on to the domain controller server and went into the date and time settings advanced panel. Ensured that the time was correct there.

Then to ensure that one of the remote clients was force updated I used this command:

net time \\<DC_name_or_IP> /set /y

Then the time was set correctly.

The DC is the main master clock for the network and it can be set manually or synchronized over the Internet using the Network Time Protocol (NTP). I was synchronizing with the time.windows.com but it was still off when I had run

w32tm /stripchart /computer:time.windows.com /dataonly

to see what was wrong. It was showing that the DC was off by 214 seconds. I readjusted the clock manually in the Date & Time settings.

Now I’m just waiting for propagation to the remainder of the network to get the correct time from the DC.

Leave a Reply

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