Created
August 7, 2019 10:12
-
-
Save whiskerz007/9d146fcb99e6db1cfb9d21bd7287f5ed to your computer and use it in GitHub Desktop.
Create a Windows Scheduled Task to synchronize the clock when the internet is established
This file contains 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
C:\WINDOWS\System32\schtasks.exe /CREATE /RU "NT AUTHORITY\LOCAL SERVICE" /SC ONEVENT /EC "Microsoft-Windows-NetworkProfile/Operational" /MO "*[System[Provider[@Name='Microsoft-Windows-NetworkProfile'] and EventID=10000]]" /TN "Update Time When Connected to Internet" /TR "C:\WINDOWS\System32\w32tm.exe /resync /force" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment