修改Windows 2008以后系统的NTP服务设置
1 @echo off 2 echo autor OAK 3 @echo off 4 echo -------------------------------- 5 @echo off 6 echo setup time resync every one hour 7 @echo off 8 REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient /v SpecialPollInterval /t REG_DWORD /d 3600 /f 9 @echo off 10 echo -------------------------------- 11 echo setup w32time auto startup 12 @echo off 13 REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time /v Start /t REG_DWORD /d 2 /f 14 @echo off 15 echo -------------------------------- 16 @echo off 17 set /p TimeServer=10.31.24.50 18 19 w32tm /config /manualpeerlist:"10.31.24.50" /syncfromflags:manual /reliable:yes /update 20 net stop w32time 21 net start w32time 22 w32tm /resync