w32tm /config /manualpeerlist:ntp1.aliyun.com,0x8 /syncfromflags:MANUAL
net stop w32time
net start w32time
w32tm /resync
::此计算机没有重新同步,因为没有可用的时间数据,重新执行时间同步
w32tm /query /source
w32tm /config /manualpeerlist:ntp1.aliyun.com,0x8 /syncfromflags:MANUAL
net stop w32time
net start w32time
w32tm /resync
::ntp1.aliyun.com可替换为实际环境下的时间服务器,多个时间服务器用空格分开ntp1.aliyun.com ntp2.aliyun.com
::以下是nginx中的阿里时间服务器反向代理
goto huo
--------------nginx------------------
stream {
upstream ntp {
server ntp1.aliyun.com:123;
}
server {
listen 123 udp;
proxy_pass ntp;
}
}
http
--------------nginx------------------
:huo
以上内容另存为xx.bat