Finally…a quick way to solve that pesky NTP issue on domain controllers…

Posted by: Justin

Ever muddle through Microsoft KB 816042?

Ever wish there was an easy way to make all those registry edits?

I have…so I did something about it - a simple batch file will do nicely.

Tested this just the other day…batch file dump below (minus the ***s)

***

@echo off

rem http://support.microsoft.com/kb/816042

rem How to configure an authoritative time server in Windows Server

rem Uses pool.ntp.org – feel free to replace with any you like (time.nist.gov is another big one)

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters /v Type /t REG_SZ /d NTP /f

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config /v AnnounceFlags /t REG_DWORD /d 5 /f

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer /v Enabled /t REG_DWORD /d 1 /f

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters /v NtpServer /t REG_SZ /d pool.ntp.org,0×1 /f

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient /v SpecialPollInterval /t REG_DWORD /d 900 /f

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config /v MaxPosPhaseCorrection /t REG_DWORD /d 3600 /f

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config /v MaxNegPhaseCorrection /t REG_DWORD /d 3600 /f

net stop w32time && net start w32time

pause

***

PS – your windows domain members should automatically look to the PDC emulator for time sync by default.

You can also use the following command in a login script to force the issue (older hack, but still works)…

net time \\[server name] /set /yes

for more info see – http://support.microsoft.com/kb/120944

Comments are closed.