sntp network query

July 19, 2010 at 13:20:48
Specs: Windows XP, 4
I have tried to modify this to scan the whole subnet range but the errorlevel failed after the first pass.

@echo off
for /l %%X in (100,1,254) do net time \\10.0.0.%%X /querysntp

There error checking is wrong and the IF Then is incomplete(I am focused on the error checking first working.)

See More: sntp network query

Report •

July 19, 2010 at 15:36:42
Can you write clearly, what it is you want?

Your code will go into endless loops the way it is written. It would be much better like this...

@echo off

for /l %%X in (100,1,254) do (
  echo %%x
  net time \\10.0.0.%%X /querysntp

Report •
Related Solutions

Ask Question