Skip to content

Instantly share code, notes, and snippets.

@clarkey
Created July 31, 2014 13:34
Show Gist options
  • Save clarkey/e05e5d53fe2f3a7c9d98 to your computer and use it in GitHub Desktop.
Save clarkey/e05e5d53fe2f3a7c9d98 to your computer and use it in GitHub Desktop.
Fix or sync Windows time from a domain controller
@echo off
cls
set /p user=Enter local admin credentials (DOMAIN\USER or WORKSTATION\USER):
set /p dc=Enter domain controller hostname (fully qualified domain name):
runas /u:%user% "net time \\%dc% /set /yes"
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment