Sunday, August 4, 2013

Configure Time Server

Domain joined machines get time from domain controller (PDC Emulator) by default, but machines on workgroup need to be configured manually to get time from PDC Emulator/NTP Server.

Below are simple set of commands to configure the same.

w32tm /config /syncfromflags:manual /manualpeerlist:YourNTPServerIP
net stop w32time && net start w32time
w32tm /config /update
w32tm /resync /nowait /rediscover
w32tm /query /status

On windows 2003/XP, try below command to query time source.

net time /querysntp

the registry key Type = Nt5DS means synchronize to domain hierarchy by default.
see more...

If facing sync issues with domain controller, open UDP port 123 on firewall, to test connectivity of UDP port, download portquery from microsoft and try this command (portqry.exe -n yourDCname -e 123 -p)

Execute below commands:
net stop w32time
w32tm /unregister
w32tm /register
net start w32time
w32tm /config /syncfromflags:DOMHIER /update
w32tm /resync
w32tm /query /status

if you want to configure NTP Server on Windows 2008, follow below link.