Synchronize time with external NTP server on Windows Server 2008 (R2).
Posted by Marek.Z on 16 November 2009
Time synchronization is an important aspect for all computers on the network. By default, the clients computers get their time from a Domain Controller and the Domain Controller gets his time from the domain’s PDC Operation Master. Therefore the PDC must synchronize his time from an external source. I usually use the servers listed at the NTP Pool Project website. Before you begin, don’t forget to open the default UDP 123 port (in- and outbound) on your (corporate) firewall.
- First, locate your PDC Server. Open the command prompt and type: C:\>netdom /query fsmo
- Log in to your PDC Server and open the command prompt.
- Stop the W32Time service: C:\>net stop w32time
- Configure the external time sources, type: C:\> w32tm /config /syncfromflags:manual /manualpeerlist:”0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org”
- Make your PDC a reliable time source for the clients. Type: C:\>w32tm /config /reliable:yes
- Start the w32time service: C:\>net start w32time
- The windows time service should begin synchronizing the time. You can check the external NTP servers in the time configuration by typing: C:\>w32tm /query /configuration
- Check the Event Viewer for any errors.
Tested on Windows Server 2008 R2 (Build 7600).
Cheers!
- Marek.Z





A8_francois said
Thanks for this, it works very well but manualpeerlist needs quotes like this : w32tm /config /syncfromflags:manual /manualpeerlist:”0.ntp.pool.org, 1.ntp.pool.org, 2.ntp.pool.org”
Marek said
OK, I’ve corrected it. Thanks for the notice.
ScieddyTrietS said
Thanx for the info!
NTPserver said
The command put the whole string into the registry, quotes and all.
This is what worked:
w32tm /config /syncfromflags:manual “/manualpeerlist:time.chu.nrc.ca,0×1 ntp.uunet.ca,0×2″
Hope that helps someone.
Marek.Z said
Hm.. strange, I’ve tested it on a W2k8 R2 server. It works without the quotes when you type the NTP servers wihout any spaces after the /manualpeerlist parameter.
guest said
My Win2k8 R2 needed this. No spaces or quotes after /manualpeerlist:
w32tm /config /syncfromflags:manual /manualpeerlist:0.ntp.pool.org,1.ntp.pool.org,2.ntp.pool.org
Brian said
Are the names of the time servers correct? When I check the link, it references *.pool.ntp.org. Your directions say ntp.pool.org.
Incidentally, it didn’t work for me in 2k8R2 until I took out the space, despite the fact that help says the list should be space delimited:
w32tm /config /syncfromflags:manual /manualpeerlist:”0.poolntp.org,1.pool.ntp.org,2.pool.ntp.org”
Marek.Z said
Hi Brian,
Yes, you are absolutely right. Thanks for pointing that out. I’ve edited the post.
Cheers!
- Marek.Z
Buford Ledwig said
I found this information usefull.
Pedro Wester said
This is a good post.
Jame Wydeven said
Thanks for this interesting information.
Cody said
Thank you for this information saved me hours of deciphering ms documentation.
PAL said
That didn’t work for me. I had to remove both the quotes and the space, delimiting only by comma, ergo:
w32tm /config /syncfromflags:manual /manualpeerlist:0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org
Marek.Z said
Hi,
Yeah, Couple of other guys already mention this. I’ve no idea why though…
Marek.Z
Devang Patel said
Marek thank you for this post, it seem to have saved so time for everyone.
I think i know why people are having problem they are cutting and pasting the command which for some reason the qoute are cuaseing an issue.
what i did was remove the qoute on notepad and put them back in. that seem to fix it.
hopefully that makes sense.
Marek.Z said
Hi,
Thanks for visit
It seems that sometimes the quotes are needed and sometimes they not. Personally, I always retype the command. This way you should be able to identify the syntax error. Don’t be a copy-paste admin
Cheers!
Marek.Z
mkaluza said
Sorry of my english …
but my w32tm help write: when I use more than one peer, I must use space between peers and “” to all switch …. eg. “/manualpeerlist:0.pool.ntp.org 1.pool.ntp.org 1.pool.ntp.org” …
Zé said
You can use quotes as long as there is no space between the argument manualpeerlist, the colon and the first quote
…/manualpeerlist:”myntp…
Marek.Z said
Thank for pointing that out. I’ve removed the space form the post. Should be ok now.
Regards.
johan said
excellent post!
this might also help someone:
To clear the current time configuration, do the following:
net stop w32time
w32tm /unregister
w32tm /register
net start w32time
unregistering will remove the whole w32tm key from the registry while registering will create a fresh key filled with the windows defaults.
Marek.Z said
Hi Johan,
Good one! Thanks for sharing.
Cheers!
Shane said
Thanks! I used a combo of your instructions and those from M$:
http://support.microsoft.com/kb/816042
the list of servers needed to have ,0×1 after each entry and a space separating them to show up correctly in the NTPClient section of the registry. Otherwise only the first server on the list would populate.
Marek.Z said
Hi Shane,
Thanks for sharing!
Cheers!
Johan van Soest said
Microsoft has provided a grafical FixIt program to set the timesources in Windows 2008 R2. This helps with all the syntax issues and the “,0×1 ” issue.
Read more about the program and where to download it here:
http://www.vansoest.it/v1/uk/default.asp?file=Hotlist.whc and open the Network topic. There is a download link in the article “How to configure an authoritative time server in Windows™ Server 2008 (R2)”
Marek.Z said
Nice, thanks for sharing!
Cheers!
MichaelM said
Worked like a champ for me, no modifications, typed as indicated, and after restarting the time service, the server picked up on the correct time right away.
THANKS!!
Graeme said
You can simplify this to two commands: (note these are both one line, they may wrap here)
w32tm /config /syncfromflags:manual manualpeerlist:0.uk.pool.ntp.org,1.uk.pool.ntp.org /update /reliable:yes
w32tm /resync
No need to restart services, and no quotes as per MS documentation
Graeme said
or even with the missing / :
w32tm /config /syncfromflags:manual /manualpeerlist:0.uk.pool.ntp.org,1.uk.pool.ntp.org /update /reliable:yes
Marek.Z said
Great, thanks for sharing!
Cheers!
Luc said
Great Job
Steve said
Thank you, finally a concise and straightforward way. It puzzles me that windows does not offer a GUI for this… RedHat even has one!
Steve
Mohamed Abd Elhamid said
nice Artical
Eric said
I’m not sure if anybody mentioned this, but the reason some people may be having problems with quotes is probably due to them being formatted.
And yes this worked great, thanks.
Eric
a13a said
Maybe too late now but in case anyone is wondering about the quotes & spaces thing, here’s the clarification – the commandline expects a single argument after a flag such as /manualpeerlist and a space tells it to end the arugment; quotes are used to make the string with spaces appear as one single argument. It’s the same as when you want to cd to Documents and Settings, for instance – it would be:
c:\> cd “Documents and Settings”
Bottom line is, if you put spaces in between the peers in the peer list, you need the quotes; no spaces, don’t need the quotes.
MagniuM said
Hey there. thanks for helpful post.
Just want to add some notes. I’ve found out recently that my 2008 R2 works weird with /manualpeerlist:”server0, server1, server2” and i changed to /manualpeerlist:time.nist.gov (just one domain)
After this step it works fine.
Moazzam said
hi, i did the above actions and added multiple Time servers:
w32tm /config /syncfromflags:manual /manualpeerlist:”0.oceania.pool.ntp.org,1.oceania.pool.ntp.org,2.oceania.pool.ntp.org,3.oceania.pool.ntp.org,ntp.mel.connect.com.au,toc.ntp.telstra.net”
but still server time which is also DC, is 6 minutes slower than the actual time.
what am i missing. please guide. Thanks
Marek.Z said
Hi,
Did you checked your firewall? Are the appropriate ports open for NTP traffic? If so, telnet to these NTP hosts to check the connection.
Cheers!
RDE said
Thanks for your excellent and succinct post. One note, I just followed this again as I had to set up a new home/consulting network doman PDC from scratch, as my old one had become corrupted by bad RAM in the server. This during a transition of server upgrades that left it as the only domain controller in the forest. Bad news, really. Anyway, the access to the external NTP servers seems to work fine with only an inbound rule allowing port 123 access enabled, with no outbound port 123 rule. FWIW, but I just verified by sorting by port numbers in my Windows firewall to be sure.
Marek.Z said
Hi,
Thanks for your post. The inbound port needs to be opened for your clients accessing the DC and synchronizing the time. I was also referring to the corporate firewall, I’ll update the post.
Cheers!
- Marek.Z
claymen said
This is what worked for me.
w32tm /config /syncfromflags:manual /manualpeerlist:”0.au.pool.ntp.org 1.au.pool.ntp.org 2.au.pool.ntp.org 3.au.pool.ntp.org” /update /reliable:yes
w32tm /resync
Keep in mind you can easily check whether it has worked by running
w32tm /query /peers
If you only see one peer then it’s not right. If you see multiple then all good. What you should see if you run the command above is written below. What I have noticed is that it will generally accept anything you put in but it needs to be as per the help section of w32tm /? which is space delimited and enclosed in quotes to get them all.
w32tm /query /peers
#Peers: 4
Peer: 0.au.pool.ntp.org
State: Active
Time Remaining: 17.2309002s
Mode: 1 (Symmetric Active)
Stratum: 3 (secondary reference – syncd by (S)NTP)
PeerPoll Interval: 6 (64s)
HostPoll Interval: 6 (64s)
Peer: 1.au.pool.ntp.org
State: Active
Time Remaining: 17.2309002s
Mode: 1 (Symmetric Active)
Stratum: 2 (secondary reference – syncd by (S)NTP)
PeerPoll Interval: 6 (64s)
HostPoll Interval: 6 (64s)
Peer: 2.au.pool.ntp.org
State: Active
Time Remaining: 17.2309002s
Mode: 1 (Symmetric Active)
Stratum: 2 (secondary reference – syncd by (S)NTP)
PeerPoll Interval: 6 (64s)
HostPoll Interval: 6 (64s)
Peer: 3.au.pool.ntp.org
State: Active
Time Remaining: 17.2309002s
Mode: 1 (Symmetric Active)
Stratum: 3 (secondary reference – syncd by (S)NTP)
PeerPoll Interval: 6 (64s)
HostPoll Interval: 6 (64s)
Fred said
Very clean and straight forward method. No registry editing required. Thanx for this
Alex said
Well the only way it worked for me ( Windows 2008 Server R2 With SP1
Was …. /manualpeerlist:”timeserver1″ “timeserver2″ “timeserver3″ …….
None of the others worked.
cheers
Wade said
Thanks Alex, this is the only way it worked for me too.
Wade
Peter Atkin said
I required our time sources between our storage devices, firewall and PDC to be synced, so now all devices get there time synced from the same source.
his is what worked for me on our 2008R2 Standard SP1 Server:
w32tm /config /syncfromflags:manual /manualpeerlist:time.nist.gov /update /reliable:yes
I then did a query using: w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 2 (secondary reference – syncd by (S)NTP)
Precision: -6 (15.625ms per tick)
Root Delay: 0.3060097s
Root Dispersion: 7.7757678s
ReferenceId: 0x808A8DAC (source IP: 128.138.141.172)
Last Successful Sync Time: 12/22/2012 9:44:22 PM
Source: time.nist.gov
Poll Interval: 6 (64s)
all working well.
Vic said
Fast, easy and reliable – that’s what we want! Thank you!
André Behar Ribeiro said
Worked perfectly on a Windows 2008 Server!!!!
Jorge Simples said
Thank you for your help
Best Regards
Franz Schenk said
Thank you for these easy configuration steps!
According http://support.microsoft.com/kb/816042/en-us and http://www.meinberg.de/english/faq/faq_28.htm, the 0×8 flag should be used.
Statement from the KB article mentioned above: Note Use the 0×8 flag to force W32time to send normal client requests instead of symmetric active mode packets. The NTP servier replies to these normal client requests as usual.
Used the following command for the configuration: w32tm /config /syncfromflags:manual /manualpeerlist:”0.pool.ntp.org,0×8 1.pool.ntp.org,0×8 2.pool.ntp.org,0×8″ and it’s working.
Marek.Z said
Hi Franz,
Thanks for sharing.
Cheers!
Gregg said
I just spent an hour on this. With 2008R2 use the “s and the ,0×1 at the end of each peer and a space between the peers. Until you get the w32tm /query /peers /verbose command to display each peer separately you haven’t got it right. The event log will tell you when you have it right imediatley with the /update.
t00thless said
Great article, thanks. I wish M$ could write something like this. I think the problem folks are having copying and pasting is, even pasted into notepad, the leading ” was backwards. I had to delete it and type ” from my keyboard.
Marek.Z said
Thank, I think I will have to change the text formatting and don’t use italic fonts.
Cheers!
SajDubai said
Hi, First Of all thank you so much guys for sharing you great knowledge. It is helping people around the globe..Keep up the good work…
I am from United arab emirates and when i checked this ntppool website the number of NTP servers in UAE is showing as Zero. My question is this will work for me or not??Your advise in this regards is highly appreciated.Thanks
Marek.Z said
Hi,
Alternatively, you can sync the time with the NTP server of your ISP.
- hth
Cheers!
Hayden Kirk said
Don’t forget to open port for NTP (UDP) traffic…
Steven said
Thanks a lot, it works well, although i had to use 0.ntp.pool.org alone as 1.ntp.pool.org, 2.ntp.pool.org were unexpected arguments. Unless you remove spaces and the quotes. When querried, still shows 0.ntp.pool.org only
John D said
Thanks! Exactly what I needed.
Len Inkster said
you need to enclose the entire manualpeerlist parameter in quotes.e.g. “/manualpeerlist:0.ntp.pool.org, 1.ntp.pool.org, 2.ntp.pool.org”
Seb said
I just had to paste the whole command but deleted and re-typed each double-quote individually. No need to wrap the whole switch in quotes.
Tom said
Just wanted you to know, this info page just keeps on giving. Thanks!
Atanas said
The command in Windows 2008 r2 must now be written as:
w32tm / config / syncfromflags: manual / manualpeerlist: “0.pool.ntp.org”, “1.pool.ntp.org”, “2.pool.ntp.org”, “3.pool.ntp.org”
Aleksey said
Thanx, it helped :
this worked in PS:
w32tm /config /syncfromflags:manual /manualpeerlist:”0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org” /update /reliable:yes
manivannan said
Dear All,
I have two DC (primary and secondary) both i have configured as
w32tm /config /manualpeer:172.25.11.90 /syncfromflags:MANUAL
around 15 domain member servers are there, almost 80% of server synchornized but only few server not getting the time from DC. is that anything need to update the domain client server or DC.
Screw MSFT said
I’ve literally tried every suggestion on here and it still doesn’t work.
I don’t blame anyone here, I blame Microsoft for this gross incompetence.
I mean seriously, do I really need to go through 2 hours of trying to figure out how to set a F*%&’ing clock?!
WHERE THE HELL IS STANDARDIZATION
F MSFT
kuasadewa said
it works like a charm for me in windows 7. if you do the copy paste, make sure you re-type the double quotes (using any text editor and repair the double quotes and copy paste from the text editor to command prompt). don’t forget one space button between ntp server lists.