Configure NTP on Windows server

By | February 1, 2015

Configure external NTP on a Windows Server

To keep this as simple as possible use the following commands:

w32tm /config /manualpeerlist:pool.ntp.org,0x8 /syncfromflags:MANUAL
net stop w32time
net start w32time

If the machine is a VM, you have to disable the time sync.

Check the NTP settings on a Windows Server

w32tm /query /status

Manually/Force synchronization the external NTP server

Run the following command:

C:Windowssystem32>w32tm /resync
Sending resync command to local computer
The command completed successfully.

If you get the following error, the computer could not reach the NTP server(s).

The computer did not resync because no time data was available.

How to remove NTP settings and start from scratch

If you completely mess up the configuration, you can always use the following commands to erase and set the NTP settings to the default W32time configuration:

net stop w32time
w32tm /unregister
w32tm /register

When doing the unregister you may get the following error.

The following error occurred: Access is denied. (0x80070005)

This error is usually solved by waiting for a short period of time. Make sure you stop the service before doing /unregister. Otherwise, a reboot will solve this issue.