Set NTP servers for time sync in Windows with command prompt and registry

⏲ Steps to set and use an NTP server with w32tm

You probably don’t want to do this on domain joined servers unless you know why you want to.
Domain members should use DCs as time servers when possible. Consider using the ALL setting if you really want to do this.

Check this post for changing time zones.

Short Version

w32tm /config /manualpeerlist:”,”
w32tm /config /syncfromflags:manual
w32tm /config /update
See the registry section for a .reg export.


Check the existing settings with w32tm /query /source

w32tm /query /source

C:\Windows\system32>w32tm /query /source
Local CMOS Clock

Set the peer list with w32tm /config /manualpeerlist:<peers>
You need to use quotes when using multiple peers. Peers are separated by commas.
The example below uses and Here’s a link for more info on using NTP servers.

w32tm /config /manualpeerlist:","

manualpeerlist registry path: Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\W32Time\Parameters\NtpServer (String)


Changing the peer list won’t change the syncfrom setting.
Use w32tm /config /syncfromflags:manual to change the source to the manual peer list.

w32tm /config /syncfromflags:manual

Other source options for syncfromflags
MANUAL: sync from peers in the manual peer list
DOMHIER: sync from an AD DC in the domain hierarchy – This is the default setting. The registry value for this setting is “NT5DS”.
NO: sync from none
ALL: sync from both manual and domain peers
syncfromflags registry path: Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\W32Time\Parameters\Type (String)


Update the config with w32tm /config /update

w32tm /config /update

You can force a sync with w32tm /resync

w32tm /resync


Here’s a link to a .reg file to use and

The raw file if you’re not into importing random .reg files from the internet.

Windows Registry Editor Version 5.00


I couldn’t work in a joke about going back in time.