Created
September 26, 2022 06:33
-
-
Save netaviator/17eaf7641d7ab8a4769cbc8015e89ffc to your computer and use it in GitHub Desktop.
Set NTP Server in Windows via Batch Script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo Stoppting W32Time Service... | |
net stop w32time | |
echo Setting ntp.level66.network as primary NTP Server... | |
w32tm /config /manualpeerlist:"ntp.level66.network",0x8 /syncfromflags:MANUAL | |
w32tm /config /reliable:yes | |
echo Starting W32Time Service... | |
net start w32time | |
pause | |
w32tm /query /configuration | |
pause | |
w32tm /query /status | |
pause | |
w32tm /query /peers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment