Created
November 11, 2021 07:58
-
-
Save KillerGoldFisch/feafc8998715cccfb170cd44f7e539f1 to your computer and use it in GitHub Desktop.
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 | |
CLS | |
ECHO. | |
ECHO. | |
ECHO NOTE: This must be run with administrative privileges! | |
ECHO If you did not right-click on this .bat and select | |
ECHO "Run as administrator" then exit now and run again | |
ECHO. | |
ECHO. | |
PAUSE | |
ECHO. | |
ECHO Setting SNTP server... | |
sc stop W32Time | |
TIMEOUT 3 | |
W32tm /config /syncfromflags:manual /manualpeerlist:"time.windows.com" | |
W32tm /config /reliable:yes | |
TIMEOUT 2 | |
sc start W32Time | |
TIMEOUT 3 | |
W32tm /config /update | |
W32tm /resync | |
TIMEOUT 2 | |
ECHO. | |
ECHO. Done! | |
ECHO. | |
PAUSE | |
EXIT | |
REM Set time source on Windows Server 2008 and later (OK for Domain Controller or Virtual Server) | |
REM For other NTP servers see: http://www.pool.ntp.org/en/use.html or: http://tf.nist.gov/tf-cgi/servers.cgi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment