Archive

Archive for January, 2012

Script to Configure Windows NTP Time Servers

January 6, 2012 3 comments

Here is a script to configure the NTP time server list on Windows servers. You can use the script to set the NTP time servers on domain controllers.

 

Windows Server 2008 NTP server and Windows 2008 R2 NTP server configuration:

:: Windows 2008 Server

net stop w32time

:: Configure time servers after the /manualpeerlist switch
w32tm /config /syncfromflags:manual /manualpeerlist:time.windows.com,time-a.nist.gov,time-b.nist.gov
w32tm /config /reliable:yes

net start w32time
w32tm /query /configuration

 

Windows 2003 Server NTP server configuration:

:: Windows 2003 Server

net stop w32time

:: Configure time servers after the /manualpeerlist switch
w32tm /config /manualpeerlist:time.windows.com,time-a.nist.gov,time-b.nist.gov /syncfromflags:MANUAL /reliable:yes
w32tm /config /update

net start w32time
w32tm /resync

 

These scripts have been tested and are fully functional on Windows Server 2008, Windows Server 2008 R2 and Windows 2003 Server. They are provided with no guarantee and I assume no responsibility for the use or misuse of these scripts or any issues resulting from their use.

Advertisements