
close
close
Instead of manually pinging all IP addresses on your LAN you can use this nice command:
Open Command Prompt and type:
FOR /L %i IN (1,1,254) DO ping -n 1 192.168.0.%i | FIND /i "Reply">> c:\ipaddresses.txt
The “-n 1” is for only 1 ping packet to be sent to each computer.
Change 192.168.0 to match you own Network ID.
This will ping all IP addresses on the 192.168.0.0 network segment and create a text file called IPADDRESSES.TXT in C:\, where it will list only the IP addresses that gave a reply.
advertisment
You can also add a -a to the PING command to resolve all the responding IP addresses to HOST names, but doing so will cause the script to take a considerable time to finish:
FOR /L %i IN (1,1,254) DO ping -a -n 1 192.168.0.%i | FIND /i "Reply">> c:\ipaddresses.txt
You can, of course, modify this script and make it suit your own desire.
I’d love to hear about any other ideas you may have .
More from Daniel Petri
advertisment
Petri Newsletters
Whether it’s Security or Cloud Computing, we have the know-how for you. Sign up for our newsletters here.
advertisment
More in Networking
How to Access and Triage Network Connectivity in the Microsoft 365 Admin Center
May 19, 2021 | Michael Reinders
Most popular on petri
Log in to save content to your profile.
Article saved!
Access saved content from your profile page. View Saved
Join The Conversation
Create a free account today to participate in forum conversations, comment on posts and more.
Copyright ©2019 BWW Media Group