powershell同步时间

第一步,判断Windows Time服务是否正在运行,如果没有,则开启它。

第二步,强制同步,不知为何,往往第一次会失败,那么就多运行几次好了。


    Get-Service w32time | Where {$_.status –eq 'Stopped'} |  Start-Service

    W32tm /resync /force

    W32tm /resync /force

原文地址:https://www.cnblogs.com/victor0/p/13728053.html