How to get a list of active IP addresses, MAC addresses and NetBIOS names on the local network?
I want to get the NetBIOS name, IP and MAC addresses for each host on the local network, preferably you do not need to go through each one PC and pay attention to the material.
How to do it with Windows Script Host / PowerShell / what?
As Darren Thomas said, use nmap.
nmap -sP 192.168.1.1/24
to scan the network 192.168.1. *
nmap -O 192.168.1.1/24
to get the user's operating system. Read the manpage for more information.
man nmap
considers
arp -a
This is all the current computer on the network knows about.
(I put this as the second option, since nmap is not installed everywhere).
If you use DHCP, then the server will provide you with a list of all this information.
This website has a good tutorial on using powershell to get online information http://www.powershellpro.com/powershell-tutorial-introduction/powershell-scripting-with-wmi/
If you want a quick list of computer names, you can use "net view". Also look at nbmac, although I'm not sure about its performance under XP. Another option would be to use nbtstat -a (after you used the network view to display workstations)
In PowerShell, you can do something like:
$ computers = "server1", "server2", "server3"
Get-WmiObject Win32_NetworkAdapterConfiguration -computer $ computers -filter "IPEnabled = 'true'" | select __Server, IPAddress, MACAddress
In PowerShell:
function Explore-Net($subnet, [int[]]$range){ $range | % { test-connection "$subnet.$_" -count 1 -erroraction silentlycontinue} | select -Property address | % {[net.dns]::gethostbyaddress($_.address)} }
Example:
Explore-Net 192.168.2 @(3..10)
Source: https://habr.com/ru/post/1276853/More articles:The easiest way to combine (server side) a collection of PDF documents into one large PDF document in JAVA - javaIs it possible to increase the limit of 256 characters in the validation drop-down lists? - vbaHow to make a hierarchical assembly using rake? - buildHow to create a PCL file from MS word - fileGwt-Ext combox repository review - formsHow to check the compliance of PDF-A 1b with open source tools? - javaHow to use TranslateBehavior in CakePHP? - cakephpInfrastructure for a software project - naming-conventionsIs there an efficient \ easy way to draw a concave polygon in Direct3d - c #C ++ strings without and STL - c ++All Articles