我正在尝试编写一个批处理文件来检查系统时间和日期。我希望它通过互联网检查。我有这部分。但认为它应该做日期部分。但它只在日期正确的情况下计算时间
@echo off
w32tm /query /peers
net stop w32time
net start w32time
w32tm /resync /nowait
EOF
我以管理员身份运行批处理文件。有人可以帮我解决这个的日期部分吗?感谢您花时间阅读这篇文章。任何信息都会得到帮助。谢谢
最佳答案
我们通过我们的 rmm 软件在美国和加拿大的网络上推送这个批处理文件
希望对你有帮助
@echo off
w32tm /query /peers
sc config w32time start= auto
w32tm /config /syncfromflags:manual /manualpeerlist:"0.us.pool.ntp.org,1.us.pool.ntp.org,2.us.pool.ntp.org,3.us.pool.ntp.org"
w32tm /config /reliable:yes
net stop w32time
net start w32time
w32tm /resync /nowait
https://stackoverflow.com/questions/32535322/
相关文章:
symfony - 如何使用 symfony 2 使工作软删除和唯一实体
oracle - 12c 和 ORA-01792 : maximum number of colum
spring - 为什么当您使用其 ID 保存实体时,从 JPA 存储库中检索的订单会发生变化?
amazon-web-services - 在 AWS CLI DynamoDB 查询操作中替换变量
java - 覆盖哈希码方法时获取 "Stack overflow error "
visual-studio-2010 - 在调试客户端-服务器应用程序时在解决方案中运行这两个应用程
html - 使用 ng-classes 样式输入占位符颜色样式