Sync Time with NTP

Manjot Singh 236 Reputation points
2021-03-29T05:26:29.823+00:00

Hi,

I would like to sync my Windows Server 2019 time to 0.ca.pool.ntp.org instead of Local CMOS Clock

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2021-03-30T02:25:50.867+00:00

    Hello @Manjot Singh ,

    Thank you for posting here.

    1.Would you please tell us whether your Windows server 2019 is in one domain or not?
    2.Is your Windows server 2019 virtual machine or physical machine?

    If your your Windows server 2019 is in one domain, we can see Time Synchronization in an AD DS Hierarchy.

    1.Time on PDC is synchronized with external NTP time server.
    2.TIme on other DCs is synchronized with PDC.
    3.Time on domain clients and member servers is synchronized with other DCs.

    Registry configuration method

    ===PDC===

    (If PDC is a virtual machine, set the first one entry, if PDC is not a virtual machine, don’t set this one entry)

    HLM\SYSTEM\CurrentControlSet\services\w32time\TimeProviders\VMICTimeProvider
    Name: Enabled
    Type: REG_DWORD
    Data:0

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config
    Key Name: AnnounceFlags
    Type: REG_DWORD (DWORD Value )
    Data: 0x5

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type
    Key Name: Type
    Type: REG_SZ(String Value)
    Data: NTP

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
    Key Name: NtpServer
    Type: REG_SZ(String Value)
    Data: Peers (time.windows.com,0x9)

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer
    Key Name: Enabled
    Type: REG_DWORD
    Data: 1

    ===other DC & Client===

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type
    Key Name: Type
    Type: REG_SZ(String Value)
    Data: NT5DS

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config
    Key Name: AnnounceFlags
    Type: REG_DWORD (DWORD Value )
    Data: 0xa

    GPO configuration methond

    Time Synchronization in Active Directory Forests
    https://social.technet.microsoft.com/wiki/contents/articles/18573.time-synchronization-in-active-directory-forests.aspx

    Reference
    How the Windows Time Service Works
    https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc773013(v=ws.10)?redirectedfrom=MSDN

    If your Windows server 2019 is not in any one domain, we can configure it as below.

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type
    Key Name: Type
    Type: REG_SZ(String Value)
    Data: NTP

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
    Key Name: NtpServer
    Type: REG_SZ(String Value)
    Data: 0.ca.pool.ntp.org

    Tip: Please back up your registry first before changing it.

    Hope the information above is helpful.

    Should you have any question or concern, please feel free to let us know.

    Best Regards,
    Daisy Zhou

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 15,416 Reputation points MVP Volunteer Moderator
    2021-03-29T05:41:44.477+00:00

    Hi @Manjot Singh
    Thank You for posting in Q & A.

    Follow the below URL
    CONFIGURING NTP SERVER FOR TIME SYNCHRONIZATION

    If the Answer is helpful, please click Accept Answer and up-vote, this can be beneficial to other community members.


  2. CoderR 1 Reputation point
    2025-01-07T22:21:39.3666667+00:00

    I had this problem with a Windows 11 machine but another identical machine worked fine.

    The problem like you mentioned is that the source is pointing to the Local CMOS clock and the configuration shows

    Type: NTP (Policy)
    NtpServer: ,0x1 (Policy)
    

    No matter what I tried (including overriding the registry SpecialPollTimeRemaining key, it would always reset back to CMOS and the blank NtpServer.

    The solution I eventually found was to create a group policy using gpedit.msc under Computer Configuration -> Administrative Templates -> System -> Windows Time Service -> Time Providers -> Configure Windows NTP Client

    • Enable this policy
    • Set the NtpServer to time.windows.com,0x9
    • Set the Type to NTP

    Save it, run gpupdate from Run to apply the policy.

    Now you should see w32tm /query /configuration show

    Type: NTP (Policy)
    NtpServer: time.windows.com,0x9 (Policy)
    

    Once it shows this, go back into gpedit.msc and set the Configure Windows NTP Client to Not configured, re-run gpupdate to apply the new policy and now when you run w32tm /query /configuration it should show you the correct information

    Type: NTP (Local)
    NtpServer: time.windows.com (Local)
    

    and when you run w32tm /query /source it should show you

    time.windows.com,0x9
    

    This was the only way I could reset windows time to use a NTP server correctly

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.