Forum Discussion

Sho20202290's avatar
Sho20202290
Copper Contributor
Dec 28, 2020

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 in the network.
Furthermore
-I want to acquire the system log of the event login of the acquired PC and output it as CSV.
(This is because I want to check the time when the PC was started and the time when it was finished.)
-This network is not an Active Directory environment, Windows belongs to Workgroup, and Macintosh is mixed.

1 Reply

  • 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.

Resources