How to get the IP and host names of multiple PCs in the Workgroup network and output the system logs

%3CLINGO-SUB%20id%3D%22lingo-sub-2017229%22%20slang%3D%22ja-JP%22%3EHow%20to%20get%20the%20IP%20and%20host%20names%20of%20multiple%20PCs%20in%20the%20Workgroup%20network%20and%20output%20the%20system%20logs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2017229%22%20slang%3D%22ja-JP%22%3E%3CP%3EI'm%20investigating%20a%20command%20that%20can%20operate%20the%20following%20behavior%2C%20but%20I'm%20not%20sure%2C%20so%20I%20would%20appreciate%20it%20if%20you%20could%20cooperate.%20%3CBR%20%2F%3E%20-I%20want%20to%20get%20the%20IP%20addresses%20and%20host%20names%20of%20multiple%20PCs%20in%20the%20network.%20%3CBR%20%2F%3E%20Furthermore%20%3CBR%20%2F%3E%20-I%20want%20to%20acquire%20the%20system%20log%20of%20the%20event%20login%20of%20the%20acquired%20PC%20and%20output%20it%20as%20CSV.%20%3CBR%20%2F%3E%20(This%20is%20because%20I%20want%20to%20check%20the%20time%20when%20the%20PC%20was%20started%20and%20the%20time%20when%20it%20was%20finished.)%20%3CBR%20%2F%3E%20-This%20network%20is%20not%20an%20Active%20Directory%20environment%2C%20Windows%20belongs%20to%20Workgroup%2C%20and%20Macintosh%20is%20mixed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2017229%22%20slang%3D%22ja-JP%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2017247%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20IP%20and%20host%20names%20of%20multiple%20PCs%20in%20the%20Workgroup%20network%20and%20output%20the%20system%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2017247%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F912481%22%20target%3D%22_blank%22%3E%40Sho20202290%3C%2FA%3E%3CBR%20%2F%3Enmap%20-sn%20192.168.1.0%2F24%3CBR%20%2F%3EPut%20your%20network%20number%20in%20it.%20It'll%20do%20a%20ping-sweep%20of%20your%20network%20and%20report%20the%20reverse%20DNS's%20of%20the%20up%20machines.%20Won't%20find%20down%20machines.%3CBR%20%2F%3E%3CBR%20%2F%3EC%3A%26gt%3B%20for%20%2FL%20%25N%20in%20(1%2C1%2C254)%20do%20%40nslookup%20192.168.0.%25N%20%26gt%3B%26gt%3B%20names.txt%3CBR%20%2F%3EThat'll%20do%20a%20reverse%20lookup%20of%20every%20IP%20in%20your%20subnet.%3C%2FLINGO-BODY%3E
Frequent Visitor

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.