Ntp

From Piszczynski
Revision as of 19:00, 25 January 2024 by Aleks (talk | contribs) (→‎NTP Services)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

NTP Services

Check NTP configuration:

  • w32tm /query /configuration (checks and shows the NTP configuration)
  • w32tm /query /peers (checks and shows the list of NTP servers configured along with their status)
  • w32tm /resync /nowait (forces the synchronization of time)
  • w32tm /query /source (shows the source of the time)
  • w32tm /query /status (shows the service status, use it to check whether the time is coming from the external NTP servers or the cmos clock)
  • w32tm /dumpreg /subkey:parameters

Check NTP server response:

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

In Linux:

  • ntpdate -q time.windows.com
  • ntpq -p 192.168.1.1


NTP Registry details

Location of NTP server config:

  • HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers

Location of w32tm service settings:

  • HKLM:\SYSTEM\CurrentControlSet\services\W32Time


NTP server Reg keys:

HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

HKLM\Software\Policies\Microsoft\W32time\TimeProviders\NtpClient

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NTPClient\