Not everything with an IP address is a computer - I found none of these suggestions returned all active IP addresses - in fact most returned very few. My home network has a combination of wired and wireless devices and two routers, mobile phones, TV, PVR, Apple AirPort and probably a few things I have forgotten. I used the following to scan all addresses on the 192.168.1.xxx subnet:
for /L %i in (0,1,255) do ping -n 1 -w 250 192.168.1.%i>>ipaddress.txt
The resulting file ipaddress.txt contains the ping results for all addresses and I looked for those with "Received = 1" - currently 16 addresses returned a result - I only have 4 computers in the house - and they were not all on.
Not everything with an IP address is a computer - I found none of these suggestions returned all active IP addresses - in fact most returned very few. My home network has a combination of wired and wireless devices and two routers, mobile phones, TV, PVR, Apple AirPort and probably a few things I have forgotten. I used the following to scan all addresses on the 192.168.1.xxx subnet:
for /L %i in (0,1,255) do ping -n 1 -w 250 192.168.1.%i>>ipaddress.txt
The resulting file ipaddress.txt contains the ping results for all addresses and I looked for those with "Received = 1" - currently 16 addresses returned a result - I only have 4 computers in the house - and they were not all on.
You could do the arp -a command to show all ARP entries in the table about computers on your network.
Source
A simple powershell network scanner
All IPs CONNECTED TO A SWITCH USING CMD
Need to pull windows printer IP addresses remotely via CMD.
Scan For IP Addresses Without 3rd party Tools
What is the main focus of Scan Network With IP Scanner CLI On Windows?
How do I scan subnet for IP addresses?
- Open a terminal window to get to the command line.
- Issue the command ipconfig and press Return. On Linux type ifconfig instead.
- Note your own IP address and the subnet mask.
- If the subnet mask is 255.255.255.0 the first three sections in your own IP address applies to the entire subnet
- Use the command for /l %i in (1,1,254) do @ping X.Y.Z.%i -w 10 -n 1 | find “Reply” where X.Y.Z is the first part of your own IP address
How can I see all IP addresses on my network in CMD?
- Get to the Command Prompt (CMD) by typing CMD in the search field in the Start bar at the bottom of your Windows screen.
- Click on the Command Prompt option in the results popup
- Issue the command arp -a in the opened Command Prompt window and press Return
Videos
For Windows based machines. Converted over one of my command scripts because WMIC is deprecating. Here it is ;)
https://github.com/illsk1lls/IPScanner
Maybe by the time the next "What have you done this month..." post goes around I'll have a GUI to go with it.
Angry IP scanner has command-line support, however it can not display results in the prompt. It can however write to a file that you later can display in your command prompt.
For example:
C:\Users\<NAME>\Downloads>ipscan-3.0-beta4.exe -f:range 10.0.0.10 10.0.0.20 -s -q
Initiates a scan that scans the range 192.168.1.10 - 192.168.1.20
C:\Users\<NAME>\Downloads>ipscan-3.0-beta4.exe -f:range 10.0.0.10 10.0.0.20 -s -q -o log.txt
Initiates a scan that scans the range 192.168.1.10 - 192.168.1.20 and writes the results to log.txt
type log.txt
Would then print the log file to the command prompt like so:
Generated by Angry IP Scanner 3.0-beta4
http://www.azib.net/ipscan/
Scanned 10.0.0.130 - 10.0.0.140
8-jul-2010 10:53:38
IP Ping Hostname Ports
10.0.0.130 [n/a] [n/s] [n/s]
10.0.0.131 [n/a] [n/s] [n/s]
10.0.0.132 [n/a] [n/s] [n/s]
10.0.0.133 [n/a] [n/s] [n/s]
10.0.0.134 [n/a] [n/s] [n/s]
10.0.0.135 [n/a] [n/s] [n/s]
10.0.0.136 [n/a] [n/s] [n/s]
10.0.0.137 [n/a] [n/s] [n/s]
10.0.0.138 1 ms HOSTNAM [n/s]
10.0.0.139 [n/a] [n/s] [n/s]
10.0.0.140 [n/a] [n/s] [n/s]
These are the commands for Angry IP scanner:
Pass the following arguments:
[options] <feeder> <exporter>
Where <feeder> is one of:
-f:range <Start IP> <End IP>
-f:random <Base IP> <IP Mask> <Count>
-f:file <File>
<exporter> is one of:
-o filename.txt Text file (txt)
-o filename.csv Comma-separated file (csv)
-o filename.xml XML file (xml)
-o filename.lst IP:Port list (lst)
And possible [options] are (grouping allowed):
-s start scanning automatically
-q quit after exporting the results
-a append to the file, do not overwrite
nmap - http://nmap.org/ - is an excellent portscanner which will do name lookup.
If you are simply looking to get a list of machine names from Windows (I'm guessing, given you refer to the "Command Prompt") you could simply usenet view