powershell - Show the computers on my wifi -
i want see output shows dns (alexander-pc, joe-pc...), mac , ip addresses.
i've tested with:
# shows pc $connectedcomputers = get-wmiobject -class win32_computersystem $connectedcomputers.username # doesn't show dns of computers (alexander-pc, example) get-wmiobject -class win32_networkadapterconfiguration
it looks want enumerate network neighborhood. if have windows 8 or newer there's get-netneighbor cmdlet list ip , mac (link-layer) addresses cache:
ps c:\> get-netneighbor -addressfamily ipv4 | select ipaddress, linklayeraddress | ft -autosize ipaddress linklayeraddress --------- ---------------- 224.0.0.252 01005e0000fc 224.0.0.22 01005e000016 192.168.56.255 ffffffffffff 192.168.56.1 000000000000 224.0.0.22 01005e000016 239.255.255.250 224.0.0.22 255.255.255.255 ffffffffffff 239.255.255.250 01005e7ffffa 224.0.0.252 01005e0000fc 224.0.0.22 01005e000016 192.168.13.255 ffffffffffff 192.168.13.12 00d02bd17940 192.168.13.15 00000c9ff1ff if have working reverse dns can dns names given ip address resolve-dnsname cmdlet.
ps c:\> resolve-dnsname 192.168.13.15 name type ttl section namehost ---- ---- --- ------- -------- 15.13.168.192.in-addr.arpa. ptr 900 question test.example.com on windows versions prior windows 8 use arp -a , nslookup.
Comments
Post a Comment