I always come across domain controllers that aren't setup to update their clock using NTP, so I wrote a little script that will check to see if the machine is a domain controller, and if it is, will set the windows time service to udpate from pool.ntp.org. Here it is:

Script Name: Set Windows Time Service to pool.ntp.org
Script Description: This will set the windows time service to set the system clock via an internet time server by issuing the command net time /setsntpStick out tongueool.ntp.org. This script works with Windows 2000 and Windows 2003 domain controllers (a registry key is checked to confirm the machine is a DC before making the change to the windows time service)

IF Check Registry Value
Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\Security\DomainControllerState
>= :1
THEN
Execute Shell Command
Parameter 1 : net time /setsntpStick out tongueool.ntp.org
Parameter 2 : 1
OS Type : 3
Execute Shell Command
Parameter 1 : net time /setsntpStick out tongueool.ntp.org
Parameter 2 : 1
OS Type : 9
ELSE






Legacy Forum Name: Script to set Windows Time Service update via internet NTP clock,
Legacy Posted By Username: dbennett