Synchronize time with Windows Time service
To synchronize an internal time server with an external source:
w32tm /config /syncfromflags:manual /manualpeerlist:Peerlist w32tm /config /update
Here, Peerlist is a comma separated list of DNS or IP Addresses for the
time servers.
To configure a client computer for automatic domain time synchronization:
w32tm /config /syncfromflags:domhier /update net stop w32time net start w32time
To see which time server is configured use following command:
reg query HKLM\system\Currentcontrolset\Services\W32time\Parameters
In case of workgroup:
You must manually configure the time synchronization settings. You might identify a computer as a locally reliable time source by configuring the Windows Time service on that computer to use a known accurate time source, either by using special hardware or by using a time source that is available on the Internet. You can configure all other workgroup computers manually to synchronize their time with this local time source.
In case of Active Directory domain:
The Windows Time service configures itself automatically by using the Windows Time service that is available on domain controllers. The Windows Time service configures a domain controller in its domain as a reliable time source and synchronizes itself periodically with this source.
References:
