Skip to content

Instantly share code, notes, and snippets.

@MrXermon
Created September 26, 2022 06:33
Show Gist options
  • Save MrXermon/17eaf7641d7ab8a4769cbc8015e89ffc to your computer and use it in GitHub Desktop.
Save MrXermon/17eaf7641d7ab8a4769cbc8015e89ffc to your computer and use it in GitHub Desktop.
Set NTP Server in Windows via Batch Script.
@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