How to Force Sync Time with Command in Windows

From time to time, Windows might show the wrong time. This is especially true when you are dual booting or some program is changing the time without informing the admin. If that ever happens to you, you can force sync Windows time with a single command. Let me show you how.

To use the Windows time sync command, you need admin privileges. If you don’t have admin privileges, use the second alternative method.

Windows Time Sync Command

To force sync time in Windows, you use the below command.

w32tm /resync

Steps to Force Sync Time with Command Line

  1. Open the Start menu,
  2. Search for “Command Prompt“.
  3. Right-click on the result and select “Run as administrator“.
  4. Type “w32tm /resync” and press Enter.

As soon as you press the Enter button, Windows will execute the time sync command. This will force Windows to show the correct time.

Detailed Step by Step Guide

First, open the start menu, search for “Command Prompt“, right-click on the result and select “Run as Administrator” option. Doing so will open the Command Prompt with admin rights.

Windows time sync command - open cmd

In the Command Prompt window, execute the w32tm /resync command.

As soon as you execute the command, Windows will resync the time according to your current timezone. The time details are updated from the default time.windows.com server (Windows Internet Time Server).

Windows time sync command - time sync command 1

Command to Sync Time with Domain Controller

If your Windows system in on a domain then use the w32tm /domain command.

Windows time sync command - time sync command 2

When executing the command, sometimes you might see “The computer did not resync because no time data was available” error. This is fairly common. Especially in Windows 7 and 8. Just execute the command multiple times and it should work.

Use Custom Time Server to Sync Time

Like I said before, Windows uses time.windows.com as the default time server. If that time server is not working for you or if you want to use some other custom time server, you can do that too.

Open the command prompt as admin and execute the following command.

w32tm /config /update /manualpeerlist:time.server.url.com

Don’t forget to replace time.server.url.com with the actual time server URL. You can use the NTP Pool Project to find the time server addresses of different countries and places.

As soon as you execute the command, Windows will access that time server, gets the time and syncs it with your system.

Sync Time Using Settings App

As an alternative, you can also sync the time using the Settings app. In fact, compared to the command prompt or the control panel, the new options in the Settings app are far easier to access and use.

1. First, press “Windows Key + I” to open the Settings app.

2. Go to the “Time & Language → Date & Time” page. On the right-panel, click on the “Sync” button under the Synchronize your clock section.

Windows time sync command - time sync button

As soon as you click the button, the PC will sync the time with the default Windows time server.

The settings app won’t allow you to change the default time server. If you use a custom time server then you have to follow the Command Prompt method shown above.

Wrapping Up

I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible. If you are dual-booting Windows with some Linus distro then Windows and Linux may show different times for other reasons. Follow the linked post to fix that issue.

1 thought on “How to Force Sync Time with Command in Windows”

  1. Avatar for Shaun Robson

    Hiya,

    thanks for the above suggestions. I’ve tried all of the above plus alternatives put forward elsewhere, but for some reason my laptop refuses to sync its time to the internet.

    Actually I think the ticking over to 2020 is the factor, but I cannot seem to get the error to fix.

    Any other suggestions would be much appreciated.

    regards
    Shaun

Leave a Comment

Scroll to Top