Showing posts with label Time and date. Show all posts
Showing posts with label Time and date. Show all posts

07 November 2009

Configure sync with time server in Windows Server

The Windows registry is like a second home to me. But one that's uncomfortable and where I don't want to be. Actually it's probably more akin to prison.

Which brings me nicely to today's lesson - making Windows Server's clock have a semblance of accuracy. All done through the registry of course! Not that I expected them to make this shit easy.

  1. Make "AnnounceFlags" = "5":
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\AnnounceFlags
  2. Edit the "Type" key to have the value "NTP":
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type
  3. Make "NtpServer" = "time.microsoft.com,0x1" or whatever time server you want:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServer
    Separate multiple servers with a space e.g. "time.windows.com,0x1 time-a.nist.gov,0x1"
  4. Make "Enabled" = "1":
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer
  5. Make "SpecialPollInterval" = "900" decimal. Yes, the special poll interval.
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval
  6. Restart the time service from the command prompt:
    net stop w32time && net start w32time

Boo to Microsoft. The bad kind of boo, too.