Use the following code snippet and save the same as "ntpq.bat" .
This is essentially useful for those who have a locked down laptop, where they can not introduce third party tools.
@echo off
if not "%1"=="" w32tm /stripchart /computer:%1 /dataonly /samples:3 %2 %3 & goto eof
:noparm
echo Syntax: ntp ^<pool.ntp.org^>
echo ntp ^<pool.ntp.org^> /packetinfo
:eof
Set the correct path and invoke the query as follows:
ntpq time.windows.com
w32tm /stripchart /computer:us.pool.ntp.org /dataonly /samples:5
A fine article on how to set Windows Server act as NTP server can be found here:
https://icookservers.blog/2014/09/12/windows-ntp-server-cookbook/
0 Comments:
Post a Comment