Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Internet Time Synchronization Failed on Windows

March 6, 2023 Questions and AnswersWindows 10Windows 11Windows Server 2019

Internet Time Synchronization Failed on Windows

A time synchronization error may occur in Windows when your computer fails to automatically synchronize its local time with the time.microsoft.com time servers on the Internet. If your computer’s time is incorrect, you may get an error “Your clock is ahead” when opening HTTPS sites in Chrome and some other browsers, third-party programs may not work correctly, and other issues.

If you try to manually sync time from the Windows Control Panel (Control Panel -> Date and Time -> Internet Time -> Change Settings -> Update now), you may stumble upon another error:

An error occurred while windows was synchronizing with time.windows.com. The peer is unreachable.

Or this one:

The peer is unresolved.

Windows won't sync time with time.mocrosoft.com

The first thing you have to do is to check if your computer is configured to automatically synchronize its time with NTP servers on the Internet. Go to Settings -> Time and Language -> Date and Time (or use a URI shortcut command to quickly access the item: ms-settings:dateandtime ). Make sure the Set time automatically parameter is enabled and click Sync now in the Additional settings to synchronize your time immediately.

Set time automatically on Windows

If Internet time synchronization fails, run the following command to find out which external NTP server your computer should get the current date/time from:

w32tm /query /peers

w32tm /query /peers - check time sync settings

By default, workgroup computers (not joined to an Active Directory domain) are configured to get time from time.windows.com servers.

If you receive the error message “The following error occurred: The service has not been started. (0x80070426)“, check the status of the Windows Time service. It should be configured for either automatic or manual start. You can check the status of the service by using PowerShell or the services.msc console:

Get-Service w32time| Select DisplayName,Status, ServiceName,StartType

Then restart the service:

Restart-Service -Name w32time

If the service is disabled, re-start it.

check w32time service

Make sure that you can access time.microsoft.com from your computer.
First, make sure that your computer can resolve this name to an IP address:

nslookup time.windows.com

resolve time.windows.com

If your computer cannot resolve this name to IP (time synchronization error “The peer is unresolved“), it means that the DNS server specified in your computer’s network adapter settings is unavailable or isolated from the Internet. Try changing the primary DNS server address to the Google DNS server (8.8.8.8). In Windows, you can use PowerShell to change the DNS settings for a network adapter.

To get a list of network interfaces, run:

Get-NetAdapter

Get-NetAdapter - list network adapters

And this is how you can change DNS settings for a network adapter with ifIndex 10:

Set-DNSClientServerAddress –InterfaceIndex 10 –ServerAddresses 8.8.8.8

Check the availability of the time server with ping:

ping time.windows.com

Then check that the Microsoft time server is available on the NTP port (UDP 123). You can use the portquery tool or query the Internet time server directly for a current time using the command:

w32tm /stripchart /computer:time.windows.com

w32tm /stripchart - show time offset between local computer and time server

If you get an error: 0x800705B4, it means that the specified NTP server is unavailable. Make sure that the outbound UDP/123 port is open in Windows for the NTP protocol (the port should be open by default). Otherwise, you can use PowerShell to force a port to open in Windows Defender Firewall:

New-NetFirewallRule -DisplayName "AllowOutNTP" -Direction Outbound -Protocol UDP -RemotePort 123 -Action Allow
Enable-NetFirewallRule -DisplayName AllowOutNTP

Also ensure that outgoing NTP traffic is not blocked at the network level (by your ISP, your firewall, or other network devices).

If this NTP server is still unavailable, try a different one.

You can specify time.nist.gov or the NTP server that is closest to you, which can be obtained from https://www.ntppool.org .

To change the NTP server address, run the command:

w32tm /config /manualpeerlist:time.nist.gov,0x1 /syncfromflags:manual /reliable:yes /update

Now restart the Windows Time service (you will run several commands in one line in this example):

net stop w32time && net start w32time

Then re-synchronize time settings on your computer:

w32tm /config /update
w32tm /resync

Check that your computer has successfully received the time from the new time source (NTP server):

w32tm /query /status

w32tm /query /status

If all else fails, try completely resetting the Windows Time service settings in Windows:

net stop w32time
w32tm /unregister
w32tm /register
net start w32time

Perform time sync:

w32tm /resync

You can also add the NTP server to the time server list and synchronize time from the Windows Control Panel. Go to Settings -> Time & language -> Date & time -> Additional clocks –> Internet Time.

First, make sure the Synchronize with an Internet time option is enabled. Then add new server time.nist.gov and click Update Now.

manage internet time servers in windows

You can add an NTP server to this list through the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers.

Change internet time server in Windows registry

A separate task in the Task Scheduler is used for automatic time synchronization in Windows. Open the taskschd.msc console and navigate to Task Scheduler (Local) -> Task Scheduler Library -> Microsoft -> Windows -> Time Synchronization. Make sure that the SynchronizeTime task is enabled.

SynchronizeTime job in Task Scheduler

You can also use PowerShell to check the status of a task in Task Scheduler:

Get-ScheduledTask SynchronizeTime

Run this command to enable the task:

Get-ScheduledTask SynchronizeTime|Enable-ScheduledTask

0 comment
0
Facebook Twitter Google + Pinterest
previous post
Find and Remove Locks in Microsoft SQL Server
next post
Prevent Users from Creating New Groups in Microsoft 365 (Teams/Outlook)

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • 0x80244010 Exceeded Max Server Round Trips: Windows Update Error
  • How to Disable or Uninstall Internet Explorer (IE) in Windows
  • Printer Settings Could Not Be Saved, Operation Not Supported
  • How to Force Remove a Printer That Won’t Uninstall on Windows
  • Group Policy Management in Active Directory
  • How to Completely Remove/Uninstall a Driver in Windows
  • Find Out Which Process is Listening on a Specific Port on Windows
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top