PowerShell 設定台灣的 NTP Server
$NTPServers = 'tick.stdtime.gov.tw,0x9 tock.stdtime.gov.tw,0x9 time.stdtime.gov.tw,0x9 clock.stdtime.gov.tw,0x9 watch.stdtime.gov.tw,0x9'Write-Host "Setting NTP Servers..." -ForegroundColor Greenw32tm /config /syncfromflags:manual /manualpeerlist:"$NTPServers" /reliable:no /update | Out-NullRestart-Service w32time -ForceStart-Sleep 5w32tm /resync /forceWrite-Host "`nCurrent Source:" -ForegroundColor Yelloww32tm /query /sourceWrite-Host "`nCurrent Status:" -ForegroundColor Yellow
w32tm /query /status
沒有留言:
張貼留言