I have scripted AuthSync.bat to configure your Windows Server 2003 PDC emulator as the authoritative time server for your domain.

The syntax for using AuthSync.bat is:

AuthSync Seconds withIP1 \[WithIP2 WithIPn\] \[\\PDC\]

Where:

<b>Seconds</b> is the number of seconds between each external time source synchronization event.

<b>withIP<i>x</i></b> is the IP address of an external time source.

<b>\\PDC</b>   is the computer name of your Windows Server 2003 <b>PDC</b> emulator, if you run the script remotely.

Example:

AuthSync 900 192.5.41.41 192.5.41.209 \\JSI001

will cause my Windows Server 2003 PDC emulator, \\JSI001, to synchronize its' clock, using SNTP (Simple Network Time Protocol), with the the U.S. Naval Observatory, tock.usno.navy.mil (192.5.41.41) or ntp2.usno.navy.mil (192.5.41.209), every 15 minutes (900 seconds).

AuthSync.bat contains:

@echo off
setlocal
if \{%2\}<h1><a name="_goto_syntax_set_work_1_set_a_secs_1000000_1_1000000_if_work_NEQ_secs_go_to_sece_if_secs_LSS_1_goto_sece_set_IP_2_set_IPOK_Y_call_valip_if_IPOK_EQU_N_goto_ipe_set_IPL_IP_set_PDCNAME_ASL_if_3_">\{\} goto syntax
set work=%1
set /a secs=1000000%1%%1000000
if "%work%" NEQ "%secs%" go to sece
if %secs% LSS 1 goto sece
set IP=%2
set IPOK=Y
call :valip
if "%IPOK%" EQU "N" goto ipe
set IPL=%IP%
set PDCNAME=
:ASL
if \{%3\}</a></h1>\{\} goto doit
set work=%3
shift
if "%work:~0,2%" EQU "\\" goto PDC
set IP=%work%
call :valip
if "%IPOK%" EQU "N" goto ipe
set IPL=%IPL% %work%
goto ASL
:PDC
if not \{%3\}==\{\} goto syntax
set OK=N
for /f "Tokens=*" %%p in ('ping -n 1 %work:~2%^|find /I "Pinging %work:~2%."') do (
 set OK=Y
)
If "%OK%" NEQ "Y" goto PDCNF
set PDCNAME=%work%:doit
call :doreg>nul 2>&1
endlocal
goto :EOF
:doreg
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config" /V AnnounceFlags /T REG_DWORD /D 5 /F
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config" /V EventLogFlags /T REG_DWORD /D 2 /F
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config" /V MaxNegPhaseCorrection /T REG_DWORD /D 4294967295 /F
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config" /V MaxPosPhaseCorrection /T REG_DWORD /D 4294967295 /F
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters" /V Log /T REG_DWORD /D 100 /F
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters" /V WriteLog /D "True" /F
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters" /V Type /D "NTP" /F
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters" /V NtpServer /D "%IPL%" /F
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /V Enabled /T REG_DWORD /D 1 /F
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient" /V Enabled /T REG_DWORD /D 1 /F
reg add "%PDCNAME%HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient" /V SpecialPollInterval /T REG_DWORD /D %secs% /F
goto :EOF
:valip
for /f "Tokens=1-4 Delims=." %%a in ('@echo %IP%') do (
 call :valipn %%a %%b %%c %%d
)
goto :EOF
:valipn
set /a cnt=0
:valipnl
set /a cnt=%cnt% + 1
if %cnt% GTR 4 goto :EOF
set /a num=1000%1%%1000
if "%num%" NEQ "%1" goto valipe
if %num% GTR 255 goto valipe
shift
goto valipnl
:valipe
set IPOK=N
goto :EOF
:sece
@echo AuthSync - Seconds is not valid
endlocal
goto :EOF
:ipe
@echo AuthSync - IP address is not valid
endlocal
goto :EOF
:syntax
@echo AuthSync Seconds withIP1 \[WithIP2 WithIPn\] \[\\PDC\]
endlocal
goto :EOF
:PDCNF
@echo AuthSync - PDC not found
endlocal