第一步,判斷Windows Time服務是否正在運行,若是沒有,則開啓它。shell
第二步,強制同步,不知爲什麼,每每第一次會失敗,那麼就多運行幾回好了。blog
Get-Service w32time | Where {$_.status –eq 'Stopped'} | Start-ServiceW32tm /resync /forceW32tm /resync /force
參考資料ip
==========get
https://devblogs.microsoft.com/scripting/powertip-force-time-resync-with-powershell/同步
https://redmondmag.com/articles/2016/01/22/powershell-to-manage-system-services.aspxit