2021年1月29日星期五

Windows Force Time Sync with time server


change registry entries 

MaxNegPhaseCorrection and MaxPosPhaseCorrection 

in 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config to maximum (ffffffff)

to avoid 'time change was too big'

Then create a batch and use admin right to run this command as below(1st line wait 10 sec)

@ping 127.0.0.1 -n 10 -w 1000 > nul

 net start w32time

w32tm /resync


Thanks!