Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Configurando NTP (Windows) por registro e linha de comando.
- ##### Podemos adicionar no registro o seguinte comando:
- ```
- REG ADD "HKLM\Software\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 0 /t REG_SZ /d "c.ntp.br" /f
- ```
- ##### E logo após "ressincronizar:"
- ```
- w32tm /resync /rediscover
- ```
- ##### Como também podemos criar um .bat para ser executado de hora em hora (não muito viável):
- ```
- @echo on & @setlocal enableextensions
- @echo =========================
- @echo Turn off the time service
- net stop w32time
- @echo ======================================================================
- @echo Set the SNTP (Simple Network Time Protocol) source for the time server
- w32tm /config /syncfromflags:manual /manualpeerlist:"c.ntp.br"
- @echo =============================================
- @echo ... and then turn on the time service back on
- net start w32time
- @echo =============================================
- @echo Tell the time sync service to use the changes
- w32tm /config /update
- @echo =======================================================
- @echo Reset the local computer's time against the time server
- w32tm /resync /rediscover
- @endlocal & @goto :EOF
- ```
Add Comment
Please, Sign In to add comment