«

»

Aug
09

How To: Time Sync Across Windows Network

**Note from the Author:  Although this may be helpful for older OS versions, the process below is no longer the correct method.

There are many reasons that a network administrator may want to synchronize the clocks on all Windows computers across the Active Directory domain.  The following steps will demonstrate how to easily accomplish that goal using group policy.  In this example, all client workstations will obtain the time and date from a domain controller using the NTP protocol.

This “howto” assumes that the domain is in good health and has a functional group policy infrastructure.

Setting Up the Server Policy

  1. On a domain controller, open up the Group Policy Management MMC.
  2. Locate the OU (Organization Unit) that contains the server that will be the time source, right-click it and select “Create and Link a GPO Here…”. (typically this would be the Domain Controllers OU)
  3. Give the new GPO a descriptive name such as “NTP Server” or “Time Sync – DCs”
  4. Right-click the newly-created GPO and click “Edit”.  This will open the Group Policy Object Editor.
  5. In the “Computer Configuration” section of the editor, expand “Administrative Templates” –>”System” –> “Windows Time Service” then click “Time Providers”.
  6. Set the “Enable Windows NTP Server” policy setting to “Enabled”
  7. Optional:  At this time, a sync source for the server can also be configured using the “Enable Windows NTP Client” and “Configure Windows NTP Client” policy settings.  By default, Windows computers will sync to Microsoft’s time.windows.com NTP server.  If this is adequate for your particular setup, these settings can be left alone.
  8. Open up a command prompt and run the following commands to apply the policy:
    gpupdate /force
    net stop w32time
    net start w32time

Setting Up the Client Policy

  1. If it is not still open, open up the Group Policy Management MMC on a domain controller.
  2. Locate the OU that contains all of the client computers on the network that should be synchronized with the server’s clock, right-click the OU and select “Create and Link a GPO here…”.
  3. Give the new GPO a descriptive name such as “NTP Client” or “Time Sync-Workstations”.
  4. Right-click the new GPO and click “Edit…”
  5. In the “Computer Configuration” section of the editor, expand “Administrative Templates” –>”System” –> “Windows Time Service” then click “Time Providers”.
  6. Set the “Enable Windows NTP Client” policy setting to “Enabled”.
  7. Double-click the “Configure Windows NTP Client” policy Setting.
  8. Set the radio box next to “Enabled” to activate the configuration section below.
  9. Set the “NtpServer” parameter to the IP Address or fully qualified DNS address of the server we applied the policy to in the section above.
  10. Set the “Type” parameter to “NTP”.
  11. Unless the Windows Time Server was customized beyond the scope of this how-to, the rest of the settings can be left at their default values.

Testing and Verification

  1. On a client computer that is contained within the OU specified in step 2 above, open a command prompt and run the following commands:
    gpupdate /force
    w32tm /resync
  2. The output of the w32tm /resync command should be “The command completed successfully.”  If an error is shown, check the application and system logs for group policy/SceCli errors and/or W32Time.

-n

No comment yet

6 pings

  1. Saj says:

    Great one..Worked for me big time..Thx

  2. Derek says:

    Thanks for your clear instructions. I have been unable to get this working though.
    Have been trying to set this up on a 2008 R2 DC.
    Followed your instructions carefully but here’s what I’m getting when testing:

    C:\Users\administrator.BBDOHK>gpupdate /force
    Updating Policy…

    User Policy update has completed successfully.
    Computer Policy update has completed successfully.

    C:\Users\administrator.BBDOHK>
    C:\Users\administrator.BBDOHK>w32tm /resync
    Sending resync command to local computer
    The computer did not resync because no time data was available.

    I reckon the issue is with the “Configure Windows NTP Client” settings and here’s what I have set:

    NtpServer = time.windows.com,0x09
    Type = NT5DS *used on computers joined to a domain so this seems correct; tried NTP with same result

    Rest of settings I have kept the defaults:
    2
    15
    7
    3600
    0

    Would greatly appreciate if you had any suggestions.

    Thanks!

  3. Derek says:

    To add, in the System log, I see this Time-Service error with Event ID 12:

    Time Provider NtpClient: This machine is configured to use the domain hierarchy to determine its time source, but it is the AD PDC emulator for the domain at the root of the forest, so there is no machine above it in the domain hierarchy to use as a time source. It is recommended that you either configure a reliable time service in the root domain, or manually configure the AD PDC to synchronize with an external time source. Otherwise, this machine will function as the authoritative time source in the domain hierarchy. If an external time source is not configured or used for this computer, you may choose to disable the NtpClient.

    Any idea how I can resolve this issue?

    Thanks!

  4. Alex Tovey says:

    I believe you are syncing the server to itself. I’ve created two gpo. one for the server and one for the client then changed the permissions. server is just the dc’s allowed for this gpo and the clients are “domain computers”

    This worked for me on resolving your issue

  5. Scott Palmer says:

    Great write up, worked for me, but I have a couple of questions.

    Doesn’t the second set of instructions where you point to the policy to the main DC create a single point of failure for time synchronization? Is there a way to add a list of NTP servers the client machines can query?

    Thanks!

  1. Windows NTP Time Sync Group Policy says:

    […] […]

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.