Windows Network Tip: How To Get A Remote Computer’s MAC Address

Usually, if I want to know my local computer’s MAC address, I would just use the command line I have been using for over 10 years, ipconfig with switch “/all”. And I would scroll up and down the window to find the line named as Physical Address.┬áThe command works perfectly fine but it wouldn’t be much of a help if you also want to get the same info from a remote computer.

On Windows 7 & 8, do you know that there is actually a better command line built in that does nothing but giving you the info of all MAC addresses found on a computer, both locally or remotely. The command is called GetMAC.

To get all MAC addresses associated with a local computer, simply run GetMAC in either Command Prompt or PowerShell window.

C:\Users\s184\Desktop\C-20130201\PSTools>getmac
Physical Address Transport Name
=================== ====================================================
1C-6F-65-DE-42-ED \Device\Tcpip_{3A273350-6C0D-4E43-B7EC-328650938AAD}
00-50-56-C0-00-01 \Device\Tcpip_{5A57F82C-B47D-49F6-9943-534C28AE555F}
00-50-56-C0-00-08 \Device\Tcpip_{C65EC725-711B-4212-8909-BBF894BDB038}

To get the MAC address from a remote computer, use

GetMAC /S remotecomputer

C:\Users\s184\Desktop\C-20130201\PSTools>getmac /s kc-vm7
Physical Address    Transport Name
=================== ==========================================================
00-0C-29-C3-76-F0   \Device\Tcpip_{07470A58-1A0F-4731-98B0-6709742A2782}
00-02-72-3F-A9-BF   Media disconnected

You can even specify the export format and export them to a file, if you want. The following command will get the MAC address from a remote computer and export them into a CSV file in the same directory.

GetMAC /s remotecomputer /fo csv > output.csv

C:\Users\s184\Desktop\C-20130201\PSTools>getmac /s kc-vm7 /fo csv >mac.csv
C:\Users\s184\Desktop\C-20130201\PSTools>type mac.csv
"Physical Address","Transport Name"
"00-0C-29-C3-76-F0","\Device\Tcpip_{07470A58-1A0F-4731-98B0-6709742A2782}"
"00-02-72-3F-A9-BF","Media disconnected"

And of course, if you don’t have the access to the remote computer, you can specify a user account in the command with a switch /U for username and /P for password.

Kent Chen

Microsoft MVP, IT Professional, Developer, Geek, and the co-founder of Next of Windows.

Last updated: 08/04/2014

Posted in: Tips & Tricks
Discover more: , , , ,