手工 ping 逐個測試太慢,且輸出雜訊多。寫批次檔只回報「Request timed out」的 IP,並存成文字檔。
@echo off
date /t > IPList.txt
time /t >> IPList.txt
echo =========== >> IPList.txt
for /L %%f in (1,1,100) do (
ping -n 2 192.168.1.%%f | find "Request timed out." >nul && echo 192.168.1.%%f Timed Out >> IPList.txt
)
cls
echo Finished!
notepad IPList.txt
注意:for 迴圈與 find 需在同一行(以 && 串接),IP 範圍自行修改。
IPTracker.bat。gpedit.msc 但批次檔仍可跑)。一個批次檔解決 DHCP 閒置 IP 盤點,免安裝工具、輸出純文字好閱讀,網管小工具箱必備。