Quick post to show how you can sync your domain controllers with external time source (time.windows.com or ntp.pool.org for example). By default, all machines in the domain will sync time from the domain controller which is the internal time server – if you have more than one DC then time will sync from the DC that holds the PDC emulator FSMO role. To check which DC is PDC emulator in your domain you need to run netdom /query fsmo command like so:
Once PDC emulator role is established there is few commands we need to run in order for time to sync, these are (run on PDC emulator):
1 2 3 |
w32tm /config /manualpeerlist:"time.windows.com,0x1" /syncfromflags:manual /reliable:yes /update w32tm /config /update net stop w32time && net start w32time |
IF you need to add more than one NTP server then the peer list entries are space delimited, example:
1 |
"0.ntp.pool.org,0x1 1.ntp.pool.org,0x1 2.ntp.pool.org,0x1" |
Once completed Windows time service should begin synchronizing time on the domain controller(s) with external source. To view the time configuration you can use w32tm /query /configuration command. In my case, my time was not synced with external time server:
and after I made the changes:
all was set to sync from time.windows.com. From workstation point of view to configure a client computer for automatic domain time synchronization:
1 |
w32tm /config /syncfromflags:domhier /update |
and to check if its syncing:
1 |
w32tm /monitor |
and to re-sync:
1 |
w32tm /resync |
If there’re any errors then these will be written to Event Viewer – please check if you’re having issues.
Comments, questions and concerns? Please leave them below!
π
Great article. Nicely done. Thank you.
Thank you. Simple and to the point. Worked on my win 2008 R2 PDC!
yes the winner !
After x other articels this was the one !
Looks like the simplest clearest most to the point double bullseye article on the subject to me.
Thank you very much…did it in less than 5 minutes and working great!! keep it up π
Thanks to your screen captures I was able to see a discrepancy and resolved my time issue. I was seeing Event 12 in the log for Time Service and it appears to have gone away when I went into group policy (computer\Admin templates\system\windows time service and changed the default NT5DS to plain NTP. Had I not seen your “After” screencap showing NTP, I might not have tried it. The w32tm commands said they completed successfully, but despite that the time type was showing NT5DS
Thanks very much for the ever so kind comments guys. I’m glad my article is helping you get the time sync sorted – must admit it was a rather quick write up!
Pingback: Sync casu na PDC W2K3 | DS4
nice article!! very helpful! thanks
very helpful thanks!
Hi, I have trouble with NTP client configuration. I ran my small script. Then half servers work and synchronized fine, and half have a trouble. For it servers
w32tm /query /configuration
show me only VMICTimeProvider in [TimeProviders] section. And I can’t add NTP Client.
w32tm /resync
The computer did not resync because no time data was available.
registry on all servers similar. NTP enabled
PS I can’t restart servers.
Just a missing “/”.
“w32tm /config /manualpeerlist:”time.windows.com,0x1″ /syncfromflags:manual reliable:yes /update”
->
“w32tm /config /manualpeerlist:”time.windows.com,0x1″ /syncfromflags:manual /reliable:yes /update”
Brilliant step by step article.
@Igor, did you get your answer, I am having the same issue with my VMs.
Hi I have set the above command on my PDC and its working but at what time difference the PDC sync its time with time server provided.
Sorry I mean to say that at what time interval the PDC communicate with time server and get update of time.
I have changed the time of PDC but it is not getting sync automatically. Do I need to run the resync command everytime to get PDC sync with time server. Pls let me know.
You shouldn’t need to to re-sync manually to get the time updated – servers and workstations will sync to PDC automatically on set interval. This includes PDC which will sync to external time source.
If you check registry settings under:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval
SpecialPollInterval value is set in seconds – 3600 is the default for servers i.e. 1 hour and for workstations is 604800 (7 days). If you leave it unset it will use dynamic interval which according to Microsoft is “dynamic interval that is determined by synchronization algorithms built into Windows Time Service”
Rebooting your server/workstation triggers time to sync as well.
One thing to note is if your servers are virtual machines you should not be using VMware Tools or Hyper-V Integration Services to sync time to the host – this is extremely bad practice as time on the host will be taken from the BIOS. This will be out of sync nine times out of ten..
thx you very much!
This should be “pool.ntp.org” instead of “ntp.pool.org “, other than that everything are precise & useful.
TOP! Thank You. It works.
Use pool.ntp.org time.windows.com is not very reliable
C:/users/administrator w32tm /configt /manualpeerlist:time.windows.com /syncfromflags:manual /reliable:yes /update
Pingback: Configure NTP on Windows server « Yogesh
Thank you for the clear & concise steps & follow up.
Pingback: Windows NTP Service & Monitoring | Andreas' Blog
Ah Micro$oft. What can be said for a software firm that implements time updates and GUI well in their clients, where it’s important, and F’s is up in it’s server products, where it’s critical.
Just hilarious.
Pingback: How to Sync Time from External Time Source – Zebra Head
I think Microsoft made the time service really more complicated that it should be. I really appreciated if someone can tell me in plain English where is the setting for time sync interval between the Windows forest time keeper and an external NTP time source.
Great post.
Thanks for the kind words guys – your support is very much appreciated! π
Pingback: software-website.com December 2021