When using nbtstat -a (IP address), will it return the true MAC hardware address of the machine?

  • Could you add the OS (or multiple of them)? I guess everyone is assuming windows since you mentioned nbtstat, but that is still an assumption. – Hennes Jan 18 '13 at 15:04


Collect them from a directly connected computer, or

Or run a program on the local computer you are trying to get the mac from, e.g. getmac which will return output like this:

enter image description here

Or via vb:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select MACAddress from Win32_NetworkAdapter where DeviceID=1")
For Each objItem in colItems
    Wscript.Echo "MAC Address: " & objItem.MACAddress 

Source of the script: this very similar question on S.U.

Or get them from the switches the computer is connected to. Precisely how depends on the brand of the managed switch.

Or write them down whenever you get new hardware and store them in a inventory database. (Mostly useful for large corporation, which will store much more information such as model, type, CPUs, RAM, helldesk calls, ...)


If you use nbtstat -a you need to specify a HOSTNAME.

To use an IP address, it's nbtstat -A <ip>.

Other options from Unix are arp -a (which doesn't really scan everything available).


True MAC address? True MAC address? Unless you pull the NIC and take it back to the manufacturer there is truly no way of knowing for sure when there are programs that can easily change your hardware address WITHIN SECONDS...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.