11
3
Is there a way I can synchronize the system clock with an Internet Time server (i.e: time.nist.gov) via command-line? Preferably, this should be something executable via BAT or PowerShell script.
This particular need arises because I have some VMs for which I regularly use the "save machine state" function, and these don't typically re-synchronize their clocks when I "wake" them. Often times, I'll re-load them to find the clock is (and is staying) days out-of-synch.
Re-synching the clock through the Internet Time Settings dialog usually works fine, but it takes a lot of mouse-clicking to do this. I'd much rather just keep a script on the desktop that I can double-click and have the job done for me.
Right now this is for a system running Windows 7 Home x64, but backward-compatibility to XP SP3 would be nice to have.
1Most VM software (Virtual PC, VirtualBox) comes with drivers ("Additions") that keep the guest's clock in sync with host, among other things. – user1686 – 2011-08-15T20:46:36.227
@grawity - Using those, but it doesn't seem to do the job. – Iszi – 2011-08-15T21:08:48.953