How to Configure Your Windows Server to Use an External Time Source
Having the same time on all your Windows servers is extremely important. Microsoft Exchange, SQL Server, and Active Directory all rely on the Time Service (W32Time). The Kerberos authentication protocol in Windows also relies on the Time Service and if the time is out of sync on the servers, you can have some serious issues.
By default, the Windows computers use the following hierarchy to synchronize time with the servers.
Copyright ©2013 Zubair Alexander. All rights reserved.
- All client desktop computers synchronize time with the authenticating domain controller.
- All member servers also synchronize time with the authenticating domain controller.
- All domain controllers in a domain synchronize time with the primary domain controller (PDC) operations master.
- All PDC operations masters in each domain synchronize time with the PDC operations master in the forest root domain.
- Start Registry Editor and go to the following location: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type
- Double-click Type and change the value to NTP.
- Click OK.
- Locate the following location in the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer
- Double-click Enabled, type 1 and click OK.
- Go to the following location in the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
- Double-click NtpServer and enter the following: us.pool.ntp.org,0×1 You can list more than one time sources here. Use spaces to separate them. The important thing to remember is to add ,0x1 at the end of each DNS name. For more information check out Microsoft's KB article 262680: A list of the Simple Network Time Protocol (SNTP) time servers that are available on the Internet.
- Click OK.
- Go to the following location in the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\MaxPosPhaseCorrection
- Double-click MaxPosPhaseCorrection and enter a decimal value in seconds. For example, for 30 minutes type 1800, for one hour type 3600 and then click OK.
- Go to the following key in the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\MaxNegPhaseCorrection
- Double-click MaxNegPhaseCorrection and enter a decimal value in seconds. For example, for 30 minutes type 1800, for one hour type 3600 and then click OK.
- Go to the following location in the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval
- Double-click SpecialPollInterval and change the value to 900 and then click OK. This value sets the time in seconds so by setting it to 900 you are configuring the time server to poll every 15 minutes.
- Go to the command prompt and type the following command. net stop w32time && net start w32time
I have tested this procedure successfully on Windows Server 2012 Datacenter, Windows Server 2008 R2 Enterprise and Windows Server 2003 R2 Enterprise. For more information and to configure the Windows time service to use an internal hardware clock, check out this KB article.
Copyright ©2013 Zubair Alexander. All rights reserved.
Leave a Comment