修改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
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步