Getting the MAC Address of a Windows Device – Part 3

So we have covered getting the MAC Address of a device using the command prompt and Powershell if we are lucky enough to be sitting in front of the device. What if we aren’t?

There are a number of tools out there that are used in the Enterprise that do this for you, SCCM for example. However, it is also possible to do this using the command line and Powershell.

Command Line

Getting this information from the command line from a remote device can be done in two ways.

Using WMIC, fire up the command line as described in Part 1 and enter the following command:

wmic /NODE: {computername} nic get AdapterType, Name, Installed, MACAddress, Speed

This command uses the Windows Management Instrumentation and has been added here as more of a demonstration than guidance as WMIC was deprecated back in 2012.

You can achieve a similar result, though with less information returned with the following code:

getmac /v /s {computername}

Powershell

As described in Part 2. start up Powershell and run the command:

Get-WMIObject win32_networkadapterconfiguration -ComputerName {computername} | select description, macaddress

This command can be extended to get even more information about the device, but that is beyond the scope of this article.

N.B. The {computername} value in each of the command examples above should be replaced with the device hostname or ip address.