Skip to content

Instantly share code, notes, and snippets.

@heetbeet
Created August 25, 2020 08:30
Show Gist options
  • Save heetbeet/ba77a4c3e97025444112ceae55e6ace8 to your computer and use it in GitHub Desktop.
Save heetbeet/ba77a4c3e97025444112ceae55e6ace8 to your computer and use it in GitHub Desktop.
Manually sync microsoft time
@echo off
if "%~1" equ "isadmin" goto :runmain
powershell "Start-Process -FilePath '%~f0' -WorkingDirectory '%~dp0' -Verb RunAs -ArgumentList isadmin"
goto :eof
:runmain
net start W32Time
w32tm /resync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment