Skip to content

Instantly share code, notes, and snippets.

@whiskerz007
Created August 7, 2019 10:12
Show Gist options
  • Save whiskerz007/9d146fcb99e6db1cfb9d21bd7287f5ed to your computer and use it in GitHub Desktop.
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
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