79389976

Date: 2025-01-27 07:27:10
Score: 1
Natty:
Report link

After googling around, I found this page. Looked at the script and tried out a few lines. Turns out the one below works out for my need.

PS C:\> $ntpservercheck = w32tm /query /status | Select-String -Pattern '^Source:'
PS C:\> $ntpserver = $ntpservercheck.ToString().Replace('Source:', '').Trim()
PS C:\> w32tm /stripchart /computer:$ntpserver /dataonly /samples:5
Tracking Child-DC-A.domain.net [1.2.3.4:123].
Collecting 5 samples.
The current time is 1/27/2025 1:09:57 PM.
13:09:57, +00.2191678s
13:09:59, +00.2194472s
13:10:01, +00.2193648s
13:10:03, +00.2189340s
13:10:05, +00.2190456s
PS C:\>

Thanks for those commented and give advice, appreciate it! =)

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: curx