os:windows:cli
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
os:windows:cli [2015-08-08 17:00] – created root | os:windows:cli [2024-04-25 19:30] – add info about setting NTP servers Manuel Frei | ||
---|---|---|---|
Line 7: | Line 7: | ||
< | < | ||
PsExec -s cmd | PsExec -s cmd | ||
+ | </ | ||
+ | |||
+ | ===== Check Remote NTP Server ===== | ||
+ | |||
+ | The following command will contact the NTP server 192.0.2.1 and show you 5 samples by printing time and offset. | ||
+ | < | ||
+ | w32tm /stripchart / | ||
+ | </ | ||
+ | |||
+ | Example with output. | ||
+ | < | ||
+ | PS C:\> w32tm /stripchart / | ||
+ | Tracking 192.0.2.1 [192.0.2.1: | ||
+ | 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 192.0.2.1. | ||
+ | |||
+ | < | ||
+ | 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: | ||
+ | Last Successful Sync Time: 25.04.2024 19:12:36 | ||
+ | Source: 192.0.2.1 | ||
+ | Poll Interval: 10 (1024s) | ||
+ | </ | ||
+ | |||
+ | ===== Set NTP Servers ===== | ||
+ | |||
+ | Set your NTP servers manually, separated by space if more than one. | ||
+ | < | ||
+ | w32tm /config / | ||
</ | </ |
os/windows/cli.txt · Last modified: 2024-04-25 19:32 by Manuel Frei