Local Windows NTP Server

This is how you can designate a Windows machine (PC or server) as a local NTP server.

Stop service w32time

  • Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\TimeProviders\NtpServer
  • Set Enabled to 1
  • Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Config
  • Set AnnounceFlags to 5
  • Start service w32time
  • Reboot

Client Configuration

Set time server(s), replace your %variables%:

w32tm /config /manualpeerlist:"%timeServer%" /syncfromflags:manual /reliable:yes /update

The list is space separated and has to be written in quotation marks.

You can force a sync with w32tm /resync.

The current time sources is shown with w32tm /query /source, the current configuration is shown with w32tm /query /configuration.

A test can be done with w32tm /stripchart /computer:%tServOnline% /samples:5 /dataonly.