How-To Geek

Sync Your Clock With Internet Time Servers from the Vista Command Prompt

If you have an issue with your system clock losing time, you’ve probably had to go and re-sync your clock with the internet time servers. The problem is that there are just way too many clicks required to get to the right screen, so the command line is much simpler.

Note that you can partially solve this issue by changing the time server you are using or increasing the intervals between time checks, but there are some instances where you’ll just want to quickly sync the time manually.

Sync Clock the Slow GUI Way

First you’ll have to right-click on the clock and choose “Adjust Date/Time”


Then you select the Internet Time tab, and click the Change Settings button…


After the UAC prompt you can finally click the “Update now” button to tell the computer to resync.


That’s a lot of steps… but check out how simple it is from the command line.

Sync Clock from Command Line

Simply open an administrative mode command prompt (right-click, Run as administrator), and then type in the following command:

w32tm /resync


And now your clock is sync’d. If you want proof, you could check the time settings panel again.


Now that just seems easier to me.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 01/25/08

Comments (36)

  1. Butwheaty

    The command prompt option also works with Windows XP Professional.

  2. mgo

    nice tip! Thanks!

  3. Montana

    Thanks, this has saved me a lot of time…………..;)


  4. teknikel

    I get: “The following error occurred:Access is denied. (0x80070005). any ideas?

  5. The Geek


    You need to be using an administrative mode command prompt.

  6. Scott

    Yes, the cli is easier, but unless you have a cesium clock in your PC, you’ll have to do it again, and again as your clock skews. The GUI will keep your PC uptotime

  7. Mick


    You can put the command in a batch file and schedule it to run as often as you want.

  8. The Geek

    @Mick & Scott

    Windows automatically syncs your computer once a week if you have that option turned on. If that’s not often enough, you can adjust the interval:

    This command line option is most useful for when you need the clock to sync right now. For instance, I have a source control application I use at work that complains if my clock is more than a few seconds off.

  9. fb

    If your computer is on a domain then you don’t get that option. I think domain computer’s sync with the PDC so does anyone have any tips on how to setup time server syncing for the PDC?

  10. Blue Ridge

    To keep my computer’s time current, I use a utility called Dimension 4 from Thinking Man Software ( ). It is much more flexible than Windows’ built-in Internet Time feature. As an added bonus, you can configure Dimension 4 to be an in-house time server (i.e., one computer [maybe the PDC] syncs with an Internet time server, and your internal computers sync with the Dimension 4 server). I’ve used this program for years, and I highly recommend it.

  11. John

    What to do if the 3rd tab “Internet Time” is missing?
    Is there anything to be done to “install” it?

  12. mark

    Thanks. For some reason even this command doesn’t sync with the internet time. Oh well, I’ll do it manually.

  13. snipefast

    the command line way does fix the error for synchronizing and if it asks you for administrator rights, close the command prompt and open it by right clicking on the command prompt icon in accessories and then click on run as administrator and then try the time sync command again and it should work.

  14. Rob

    Mine says

    the computer did not recognise the resync because the required time was too big….

    any help?

  15. john

    great idea, but what happens if you get “The following error occurred: Access is denied.

  16. john

    and running in admin mode I get “The computer did not resync because no time data was available”

  17. Jeremy

    I get the same as John, “The computer did not resync because no time data was available”

  18. peter

    If i go to Adjust date and time on my windows vista. then there is no internet time tab at all.
    so i can i sync my vista laptop with a internet time server ?

  19. Daniel Raiche

    In vista you can also setup your client time server using gpedit.msc – Administrative templates – system – Windows Time Service – Time Providers. You have the option to manually set the time provider like which seems to work the best, and even set the vista machine as a NTP provider for the rest of the network. Use C:\gpupdate /force after you make changes and test it out.

  20. Ambious

    Thank you!
    This helped me alot, I’m gonna create a batch file and schedule it to run every five minutes.
    Anyone have any idea why the phenomena of losing time happens in the first place?

  21. Abul

    I tried all suggestion given here and it seems like it does work…until i reboot my DELL inspiron 1525 laptop and the same problem will occur again and again. Does this problem has something got to do with game? FYI, I installed ONLY Football Manager 2008 weeks ago. But i only stucked in this problem few days ago (march 24, 2009).

    can anybody help?
    thank you.

  22. Flesz

    nice one

  23. nadia

    i have the problem of ‘access denied’ when i try the internet time synchronisation. and i think because of the i cannot log in on my msn live messenger! :( please help me solve the problem. i tried running the command prompt as an administrator (and anyway no one else uses my pc so i log in as an administrator anyway). it just says access denied. last nite it did not say ‘access denied’ it just said ‘an error occurred during synchronisation’ and i could log in on msn. but when it says ‘access denied’ i cant


  24. Zyilv

    I have the same problem like the one faced by Nadia too and several other..

    1) I always run my pc as an administrator.. but the command prompt said that my access is denied.

    2) I try to synchronize with internet time server.. and i tried several server such as,, etc.. but all failed to synchronize. “An error occurred while windows was synchronising with …. ”

    3) How do I “manually set the time provider like which seems to work the best, and even set the vista machine as a NTP provider for the rest of the network.’

    4) I need to reset my system clock manual every times I restart my laptop as it will be set to 1.1.2005 everytime.. what is the problem??

  25. mjs3790225

    I was having a sync problem too. With the help on here and a little experimenting, I was able to get it solved.

    Running through the command prompt is infinitely more helpful than the GUI as it gives better error messages. Turns out, my clock was a day off and the sync thing decided that since it was so far off, it wouldn’t bother syncing. IDK, that sounds pretty dumb to me. At any rate, I set my time manually back onto the correct day in the GUI, then hit the update button. Worked fine after that.

    What I did:

    1. Ran clock update in command prompt (administrator mode or else you get an access denied error)
    2. Read error message (something along the lines of it being to far off so the sync was aborted)
    3. Headed to the GUI, fixed the time manually so it was closer.
    4. Hit normal sync / update button
    5. Enjoyed the success.
    6. Wondered why that had to be so complicated =/

  26. Isaac

    How to sync my clock to internet time on Windows 7

  27. dorben


  28. tendydon

    Thanks a Lot … :)

  29. CameronBerry

    Thanks for this tip! I have an old Vaio (VGN-FS550) that I resurrected and put Win7 Pro on. The Vaio does not have very good drivers for Win7 so there are many quirks that I have to work around, such as that none of the blue “fn” key functions work at all. So, for instance, my screen is always at full brightness.

    Also the time will not resync when I sleep or hibernate the computer. To resync the time I have been doing it the hard way till now. But may I add one more thing?

    I made a shortcut on my desktop to automate the command you pass into the cmd prompt:
    1. Right-click mouse on desktop
    2. go to “New”, then “Shortcut”
    3. The wizard that pops up will ask you to “Type the location…”
    4. Enter this exactly “C:\Windows\System32\w32tm.exe /resync” (I did this on a 32-bit version)
    5. Name the shortcut and finish the wizard
    6. Right-click on new shortcut
    7. Go to “Properties”
    8. Click the “Advanced” button on the bottom
    9. Check the “Run As Administrator” check box
    10. Click “Ok” on all boxes to close them

    You now have a shortcut to resync your time!

  30. Joey Ooi

    Thanks mjs3790225 for your comment.

    My computer really went way far off the sync that no matter how many times I pressed “update” It just won’t.

    So I change it to the correct today’s date. Pressed twice (first time won’t update for some weird reason) and voila.

    Computer is successfully synced. Seems that It won’t update if your time is set wayyyy off.

  31. Ryan

    I tried doing this and when i typed in “w32tm /resync” it said “The following error has occured:The service has not yet been started. ” Does anyone have any ideas what the problem might be?

  32. Ariel

    Great tip!!!… Thanx :)

  33. Helena

    The command prompt method was useful, Thanks! I had to manually adjust my time because command prompt didn’t bother since it was ‘too big’ of a change, and that was when I realised that my clock was 2 days into the future. Then i went back to command prompt and adjusted it fine :) I wonder how the computer clock time gets out of sync in the first place?

  34. HedRat

    Somebody else recommended this utility ( Neutron. It can be configured to run from the command line (we’re running it non-interactively too). Just configure the .ini file with the NTP servers you want or leave the existing selection, and change the flags to auto-sync and exit on completion (the other flag is to set the initial NTP server selection). Works brilliantly, even if the clock is completely out.

  35. Ian

    i get the following the computor did not resync because no time data was available
    and the other way
    an error ocurred while windows was syncronising with (all time clocks available)

  36. fedup

    An error occurred getting the status of the last synchronization. The RPC server is unavailable.

    An error occured while Windows was synchronizing with
    Windows could not start the Windows Time service on Local Computer
    error 1290: The service start failed since one or more services in the same process have an incompatible service SID type setting.
    A service with restricted service SID type can only coexist in the same process with other services with a restricted SID type. If the service SID type for this service was just configured, the hosting process must be restarted in order to start this service.

    The computer did not resync because the required time change was too big.

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!