Quick Contact

How to configure time server in server 2003 & 2008

A simple batch file to configure Server 2K3/8 machine to update the time from the European pool.ntp time servers.

For example:

If it's run on a domain controller, it'll also mark it as a reliable time server.

For Windows Time service to work, it requires UDP port 123 to be open.

You need permit ions for update server reg file.

 

@Echo Off

net stop "w32time"

Echo "Configuring pool.ntp site as update source"

w32tm /config /manualpeerlist:"0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org 3.europe.pool.ntp.org"

w32tm /config /syncfromflags:MANUAL

w32tm /config /reliable:YES

net start "w32time"

Echo "Updating"

w32tm /resync

Echo "Check Peer list"

w32tm /query /peers

pause

Echo "Check status"

w32tm /query /status

pause

@Echo on

exit

 

 

Any way you can manually update reg

for example :

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]

"NtpServer"="0.pool.ntp.org,0x8 1.pool.ntp.org,0x8 ntp2.imvp.ru,0x8"

for

w32tm /config /manualpeerlist:"0.pool.ntp.org,0x8 1.pool.ntp.org,0x8"

and

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config]

"AnnounceFlags"=dword:0000000a

for

w32tm /config /reliable:yes

and

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]

"Type"="NTP"

for

w32tm /config /syncfromflags:manual

 

 

Additional Articles
X

Partners

© 2013 XGlobe Online Ltd.