Windows Ping Sweep for live hosts

I used this one day to see how many IP’s I was using in the network by doing a ping sweep.

for /l %i in (1,1,254) do @ping 192.168.1.%i -n 1 -w 100 | find “Reply”

This will ping all addresses from to one time each, wait 100ms for a reply.

for /l %i in (1,1,254) do @ping 192.168.1.%i -n 1 -w 100 | find “timed out”

This would let you know what is not in use if you were looking for a free IP address.

If you want to pipe it to a text file use >> filename.txt at the end of the command.


Now if you want to see if the IP has a DNS record for example if the host got a DHCP address most cases it would of sent it’s hostname, use the following command with IP address

ping -a

Close Menu