Back to Top

Sunday, October 19, 2008

Changing the NTP server under Windows

Disclaimer: I'm not a Sysadmin and I'm especially not a Windows/Active Directory sysadmin. From what I've know, there is some overlap between this and the AD stuff (in the sense that the DC also provides time info AFAIK, so please also check that possibility if it applies). As always, feedback is welcome.

Setting up NTP under Windows if you want to use a different server than the one provided by MS can be rather tricky. I've managed to do it via the following steps:

  1. Ensure that you have the correct time zone set. You can do this either via the control panel or via the command line the following way (of course, change the string as necessary):

    control.exe timedate.cpl,,/Z (GMT+02:00) Athens, Bucharest, Istanbul
  2. Set the NTP server:

    net time /
  3. Make sure that the w32time service is started at system startup. Attention to the space after the equals (=) sign! Due to some dubious reasons, the sc programs needs it that way:

    sc config w32time start= auto
  4. Restart the service and it should automatically synch:

    net stop w32time
    net start w32time
    w32tm /resync /nowait

If you are still having problems (firewalls filtering packets, etc) you may want to try doing a traffic capture with Wireshark (with a filter like "port 123" - because port 123 is for NTP) and analyze it (are packets being sent? are packets being received?).

Update: I've seen a Word document floating around the Internet which describes a lot of possible problems and their solutions with the w32time/NTP service, but I just can't seem to find it any more. If somebody could put provide the link to it, I would be grateful (since it provides much more detailed info than this short post).


  1. Thanks, that was a lot simpler than this wild Microsoft regedit article that came up first in the Skynet results: After reading this I just found out that you can also set up a round-robin as recommended by, like this:
    net time /setsntp:"" (those are the settings for Spain).

    Do you know how often XP syncronises with the NTP servers by default? Can this be changed via command line?

    PS: I couldn't resist using the opportunity to make a little pun-based SEO for a friend of mine.

  2. Hello

    Sorry for the late reply, I had limited network access / time in the last couple of weeks. What I could find with Google: Configuring the Windows Time service to use an external time source - directly from the horses mouth (not that I'm comparing MS to a horse or anything like that ;-)).

    At point 3 it gives the instructions on how to set the polling interval and it seems to suggest that the default one is 15 minutes (900 seconds). You can edit the registry from the command line using the REG command, so implicitly you can change this value from the command line. You might need to restart some services (w32time probably) before the change takes effect.

    Hope this helps. I would also recommend that you ask this question on serverfault or superuser.

    PS. SEO is ok as long as useful content is provided.