I need to set "the name of the synchronization server" and check "enable synchronization" option from the command line (possibly using W32tm.exe). I tried different options, manage to only manually synchronize time once, but not permanently set the server name. Is it possible to set this from the command line?
1 Answer
It depends on your windows version "Newer" version accept w32tm /config /syncfromflags:manual /manualpeerlist:"my.server.com otherserver.net"
On older versions use net time /setsntp:"my.server.com otherserver.net"
-
Windows7. Unfortunately this is not working. This command only once synchronize time from the specified server, but does not overwrite the settings in the w32tm. Aug 17, 2015 at 13:11
-
try (after the command above) w32tm /config /update --- net stop w32tm -- net start w32tm .---- if this doesn't help check this kb article (it says XP but also works for W7) support.microsoft.com/en-us/kb/314054– ManniATAug 17, 2015 at 16:10
-
If I call net stop W32Time and net start W32Time the time's synchronized with command line server, but the server configured in time dialog remains original, without change. Even after restarting the computer. So I guess the next automatic time synchronization would be conducted by a server configured in the time dialog. Aug 17, 2015 at 16:46
-
1And in registry [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Parameters] is new server in key "NtpServer"="time.nist.gov", but in time dialog remains original server time.microsoft.com ... :( Aug 17, 2015 at 16:57