Forum Discussion
Sho20202290
Dec 28, 2020Copper Contributor
How to get the IP and host names of multiple PCs in the Workgroup network and output the system logs
I'm investigating a command that can operate the following behavior, but I'm not sure, so I would appreciate it if you could cooperate. -I want to get the IP addresses and host names of multiple PCs...
learn2skills
Dec 28, 2020MCT
Sho20202290
nmap -sn 192.168.1.0/24
Put your network number in it. It'll do a ping-sweep of your network and report the reverse DNS's of the up machines. Won't find down machines.
C:> for /L %N in (1,1,254) do @nslookup 192.168.0.%N >> names.txt
That'll do a reverse lookup of every IP in your subnet.
nmap -sn 192.168.1.0/24
Put your network number in it. It'll do a ping-sweep of your network and report the reverse DNS's of the up machines. Won't find down machines.
C:> for /L %N in (1,1,254) do @nslookup 192.168.0.%N >> names.txt
That'll do a reverse lookup of every IP in your subnet.