sexta-feira, 12 de junho de 2020

Verificar NTP server funciona ou não, Check NTP server Date and Time

1 The command we use is in following format:

w32tm /stripchart /computer:domainnameORipaddress /dataonly /samples:5

2 Enter following command to test “time.windows.com”

w32tm /stripchart /computer:time.windows.com /dataonly /samples:5
Microsoft Windows - CMD -   w32tm /stripchart /computer:time.windows.com /dataonly /samples:5 output
Microsoft Windows – CMD – w32tm /stripchart /computer:time.windows.com /dataonly /samples:5 output

Bonus: Other commands

1 Show the current time zone settings:

w32tm /tz

2 List external NTP servers (peers)

w32tm /query /peers
Microsoft Windows - CMD -  w32tm /query /peers output
Microsoft Windows – CMD – w32tm /query /peers output

Note! If you have encountered this error: “The following error occurred: The service has not been started. (0x80070426)”, you need to start the “Windows Time” service, you can start a elevated cmd or PowerShell by using Win + X key combination then select “Command Prompt (Admin)” or “Windows PowerShell (Admin)” then type “sc start W32Time” to start the Windows Time service or using Run window and type “services.msc” then find “Windows Time” service and start it.

3 Restore Windows Time service settings to default

C:\>net stop w32time
C:\>w32tm /unregister
C:\>w32tm /register
C:\>net start w32time

4 Re-sync Time

Resynchronize the clock as soon as possible, disregarding all accumulated error statistics. If no computer is specified, the local computer will resynchronize. The command will wait for resynchronization unless the /nowait switch is used.

w32tm /resync

5 Redirect the network configuration and Re-sync time

Force redetection of network resource before resynchronization.

w32tm /resync /rediscover
Microsoft Windows - PowerShell - w32tm /resync /rediscover output
Microsoft Windows – PowerShell – w32tm /resync /rediscover output

6 Check current NTP configuration

Show Information:

w32tm /query /status
Microsoft Windows - PowerShell -  w32tm /query /status  output
Microsoft Windows – PowerShell – w32tm /query /status output

7 Show Configuration:

w32tm /query /configuration

Microsoft Windows – PowerShell – w32tm /query /configuration output

0 comentários :

Enviar um comentário