User Tools

Site Tools


Windows - CLI

Open CMD as System Account

PsExec is required.

PsExec -s cmd

Check Remote NTP Server

The following command will contact the NTP server and show you 5 samples by printing time and offset.

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

Example with output.

PS C:\> w32tm /stripchart /computer: /dataonly /samples:5
Tracking [].
Collecting 5 samples.
The current time is 18.04.2024 10:04:19.
10:04:19, -191.1682338s
10:04:21, -191.1659023s
10:04:23, -191.1665833s
10:04:25, -191.1664487s
10:04:27, -191.1664522s

Show Time Source

Show the current time source.

w32tm /query /status

Example: NTP time source with server

PS C:\> w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 3 (secondary reference - syncd by (S)NTP)
Precision: -23 (119.209ns per tick)
Root Delay: 0.0133334s
Root Dispersion: 0.0289849s
ReferenceId: 0xC0A80101 (source IP:
Last Successful Sync Time: 25.04.2024 19:12:36
Poll Interval: 10 (1024s)

Set NTP Servers

Set your NTP servers manually, separated by space if more than one.

w32tm /config /manualpeerlist:"" /syncfromflags:manual /update

More information: Windows Time service tools and settings

os/windows/cli.txt · Last modified: 2024-04-25 19:32 by Manuel Frei