[SOLVED] Finding network hosts / devices from Microsoft Windows CMD line.

Hi there.

So You are trying to find all the “active” devices / hosts in Your lan and the only thing You have accessible is a MS Windows command line?

Well…

Click on Menu Start > Run (or press [Windows_key] + [R] combo on Your keyboard. Type in:

cmd

and press [Enter].

IF You have set up the IP statically and / or You know the IP range of the network You are using You can skip this step.

Type in:

ipconfig

and press [Enter]. From here You will find out what IP has been assigned to Your machine by DHCP…

So lets say Your IP is 192.168.0.10. This means that _PROBABLY_ the rest of the devices in Your network will have 192.168.0.xxx IP addresses.

Knowing this use this command:

for /L %I in (1,1,254) DO ping -w 30 -n 1 192.168.0.%I | find "Reply"

IF Your IP range looks like 192.168.1.xxx

for /L %I in (1,1,254) DO ping -w 30 -n 1 192.168.1.%I | find "Reply"

and so on…

Unless the devices are set to drop ICMP requests You should be able to see ping replies from the active hosts.

Cheers.

Andrzej

AndrzejL

"Never meet Your heroes. Most of the time you'll only end up disappointed." White Polak Male Husband Employee Hetero Carnivorous Fugly Geek @$$hole with ADD Catholic “Some men just want to watch the world burn.”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.