Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

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

March 15, 2024 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

Configure NTP Time Source for Active Directory Domain

May 6, 2025

How to Cancel Windows Update Pending Restart Loop

May 6, 2025

View Windows Update History with PowerShell (CMD)

April 30, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

Remove ‘Your License isn’t Genuine’ Banner in MS...

April 21, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

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

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • 0x80244010 Exceeded Max Server Round Trips: Windows Update Error
  • Shutdown/Restart Windows using Command Prompt and PowerShell
  • How to Force Remove a Printer That Won’t Uninstall on Windows
  • Fix: Windows Update Tab (Button) is Missing from Settings
  • How to Completely Remove/Uninstall a Driver in Windows
  • Fix: Your IT Administrator Has Limited Access to Virus & Threat Protection
  • Permanently Disable Driver Signature Enforcement on Windows 11
Footer Logo

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


Back To Top