Feb 26, 2008

Windows Server 2003 Time Service

We recently installed active directory on a computer here in the office and noticed that everyone's time was off by about 15 minutes. Turns out that when we did that all the clients in the domain started getting their time from the domain controller. It also turns out that the domain controller wasn't using an external source for time. Now in other versions of Windows meant for use by mere mortals, you can just open the time/date control panel and select an internet time source (well sometimes you can, we also find we have to re-apply the time zone we are in and wait a few seconds and then the internet tab shows up). In Windows Server 2003 you get to use the command line. First you must specify which time server you want - Get a command prompt window open and type the following command and hit Enter. w32tm /config /syncfromflags:manual /manualpeerlist:PeerList Where PeerList is a comma separated list of either DNS names or ip addresses of the time servers. (You can get a list of DNS names from http://tf.nist.gov/service/time-servers.html) I just used this w32tm /config /syncfromflags:manual /manualpeerlist:time-a.timefreq.bldrdoc.gov Which is a NIST server in boulder. Then type w32tm /config /update and hit Enter. Wait a short while (usually less than 30 seconds) and your time should update. If either of the above two steps fail you should get a failure message, otherwise you should get The command completed successfully.

4 comments:

danny said...

command prompt says that command is unknown...

Tod said...

I'm not sure why you would get this error. I just tried w32tm on both XP and Vista and it works for me. (You're not spelling out time are you? That is don't use w32time, use w32tm).

mattyD said...

Will this time server work on the east coast? Today Ive had a terrible "time" with all my servers inexplicably changing their times. First they were five hours fast then after I manually changed their clocks, they changed their time (ten hours later) to five hours slow. I'm at a complete loss on this.

John De Groot said...

Awesome! Thank you!!

About Me

My photo
Tod Gentille (@todgentille) is now a Curriculum Director for Pluralsight. He's been programming professionally since well before you were born and was a software consultant for most of his career. He's also a father, husband, drummer, and windsurfer. He wants to be a guitar player but he just hasn't got the chops for it.