The following script allow you to do just that.
It contains 3 elements:
- "computers.txt" - the full list of computers in your LAN (probably from AD), names only!!!
- "Step1.cmd" - run's the next file in a loop on each line from "computers.txt"
- "Step2.cmd" - The command itself.
content of step1.cmd:
======================
for /f %%A in (computers.txt) do (step2.cmd %%A)
======================
content of step2.cmd:
======================
ping -n 1 -w 300 %1 find "TTL">nul
IF %ERRORLEVEL% == 0 (echo %1 >> alive.txt) ELSE (echo %1 >> dead.txt)
======================
By for now...
No comments:
Post a Comment