Mark Berry August 24, 2014
I’ve blogged about checking Windows Time Settings and how sometimes Windows Time Stops Even When Set to Start Automatically. But what if you just need a basic setup for a domain controller or for a computer that is not joined to a domain?
Here are the commands I use (from an administrative command prompt) for a computer based in the United States. This is only for setting up a domain controller or a non-domain computer. Do not use these commands for domain members!
w32tm /dumpreg /subkey:Parameters w32tm /dumpreg /subkey:TimeProviders\NtpClient w32tm /config /manualpeerlist:"0.us.pool.ntp.org,0x1 1.us.pool.ntp.org,0x1 2.us.pool.ntp.org,0x1 3.us.pool.ntp.org,0x1" /syncfromflags:MANUAL net stop w32time && net start w32time w32tm /dumpreg /subkey:Parameters w32tm /dumpreg /subkey:TimeProviders\NtpClient time /t
What the Commands Do
1. Display several time service registry values.
2. Set the time source to a /manualpeerlist consisting of the four U.S. pool servers from the ntp.org Pool Project. (See that site for servers in other parts of the world.) The peer list appears in the NtpServer registry value (see screen shot).
Also set /syncfromflags:MANUAL which tells it to use use the peers from the manual peer list. This sets Type to NTP (see screen shot).
3. Restart the time service.
4. Display the time service registry values again.
5. Display the current time. Make sure this is correct!
Sample output of steps 2 through 4:
The last line in the screen shot shows the SpecialPollInterval.
Note the 0x1 after each server entry in the manual peer list. This SpecialInterval tells Windows Time to check the time every SpecialPollInterval seconds. If your SpecialPollInterval is already 3600 (1 hour) as shown above, that should be fine for a physical server. If your server is virtualized and thus subject to more clock skew, you may want to reduce that, e.g. to 900 (15 minutes). There is no command to do that; you must edit this registry value:
The meanings of the registry values are documented on TechNet.