Skip to content

Instantly share code, notes, and snippets.

@maxbelyanin
Created August 18, 2015 13:14
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save maxbelyanin/9a5a98638a17e3a31ad0 to your computer and use it in GitHub Desktop.
Save maxbelyanin/9a5a98638a17e3a31ad0 to your computer and use it in GitHub Desktop.
Starts the Windows NTP-Server
reg add "HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config" /v "AnnounceFlags" /t REG_DWORD /d 5 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /v "Enabled" /t REG_DWORD /d 1 /f
net stop w32time && net start w32time
@maxbelyanin
Copy link
Author

  1. Run as administrator
  2. Check the success: w32tm /stripchart /computer:192.168.0.X /dataonly /samples:5
  3. If failed (the 'net stop w32time' returns error), just run service 'net start w32time'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment