We can get the (physical) MAC address of a computer using the ‘getmac’ command. This command can also be used to find out the MAC address of a remote computer. Here are some examples of how to use this command. It works on Windows XP, Vista, 7, 8, 10 and their Windows server versions.
Get MAC address by CMD using getmac
Just open the console and run the command getmac which will give you the result as shown below, you can also get it as a list using getmac / v / fo list
Microsoft Windows [Version 10.0.18363.1082]
(c) 2019 Microsoft Corporation. All rights reserved.
C:UsersFernando>getmac
Physical Address Transport Name
=================== ==========================================================
00-FF-30-CC-FD-D2 Media disconnected
00-FF-62-47-0B-A4 Media disconnected
F8-D1-11-EE-36-52 DeviceTcpip_{1A18B458-E622-4B81-99E1-EABCD1801B01}
BC-AE-C5-E5-89-E3 Media disconnected
0A-00-27-0E-00-0B DeviceTcpip_{4AC82586-8E67-4DC3-A3EF-C27F5DFF28CE}
00-15-83-EE-25-7C Media disconnected
C:UsersFernando>
MAC addresses of disabled network connections will not be displayed. because you can run the command: ncpa.cpl to verify that all connections are enabled.
Obtain the MAC address using IPCONFIG
Functioning ipconfig / all In the following way, you can know the MAC address of a specific network device, because the information is listed by device name.
Microsoft Windows [Version 10.0.18363.1082]
(c) 2019 Microsoft Corporation. All rights reserved.
C:UsersFernando>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : DESKTOP-PGOSIN3
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Ethernet:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek PCIe GbE Family Controller
Physical Address. . . . . . . . . : BC-AE-C5-4E-89-E3
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Wireless LAN adapter Wi-Fi 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Qualcomm Atheros AR5008X Wireless Network Adapter #2
Physical Address. . . . . . . . . : F8-D1-11-EE-36-52
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.0.5(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Saturday, September 26, 2020 7:57:46 AM
Lease Expires . . . . . . . . . . : Saturday, September 26, 2020 1:27:47 PM
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 162.252.172.57
149.154.159.92
NetBIOS over Tcpip. . . . . . . . : Enabled
C:UsersFernando>
Obtain the MAC address of the remote computer
To know the MAC address of a remote computer, we can use the command nbtstat
C:>nbtstat -a 10.63.71.55
Local Area Connection:
Node IpAddress: [10.59.13.47] Scope Id: []
NetBIOS Remote Machine Name Table
Name Type Status
--------------------------------------------
7CF71D1C3B05 UNIQUE Registered
MAC Address = 00-00-00-00-00-00
Wireless Network Connection:
Node IpAddress: [10.63.71.58] Scope Id: []
NetBIOS Remote Machine Name Table
Name Type Status
--------------------------------------------
7CF71D1C3B05 UNIQUE Registered
MAC Address = 7C-F7-1D-1C-3B-05
Local Area Connection 2:
Node IpAddress: [0.0.0.0] Scope Id: []
Host not found.
Alternatively, we can use the command getmac as follows to find out the MAC address of a remote computer within the same network.
getmac /s computadora_remota /u usuario /p contraseña
remote_computer: Modification by IP address or computer name.
Another command that gives us the MAC address is arp -a IP for example:
arp -a direccion_ip