We can find mac address (physical address) of a computer from windows command prompt(CMD) using the command ‘getmac‘. This can be used to get mac address for remote computers also. Below are few examples on how to use this command. It works on XP, Vista, Windows 7, Server 2003 and Server 2008 operating systems.
To get mac addresses on the local computer
Just run the command getmac to get the mac addresses. Find an example below.
C:\>getmac
Physical Address Transport Name
=================== ==========================================================
2C-3F-45-02-1B-32 \Device\Tcpip_{7E49B486-120A-4BC2-2114-B345A4D5C5}
10-13-17-BC-12-48 Media disconnected
22-B3-C5-30-76-78 \Device\Tcpip_{213E8D2A-1DBE-4240-8301-BE6F3EACAF9D}
00-05-2A-3C-78-00 \Device\Tcpip_{F01E3FC2-A5A1-6940-D1A1-C7521AEC4296}
2C-23-45-14-23-AD Media disconnected
C:\>This command does not show mac addresses for the network connections which are disabled. You can run ncpa.cpl and check which NICs are disabled.
Get mac address of a remote computer.
We can run the below command to retrieve the mac addresses of a remote computer.
getmac /s remote_computer /u username /p password
remote_computer : Full name of the remote computer or IP address
username and password are of the account on the remote computer.
Example:
C:\>getmac /S remotepc.domain.com /u administrator /p adminpassword
Physical Address Transport Name
=================== ==========================================================
22-15-25-9C-3A-29 Media disconnected
34-11-45-7A-9C-48 \Device\Tcpip_{678DD7BB-675D-4E4C-E0AE-A261490EBE8C}If you do not want to specify the password, you can skip /p parameter. You will be prompted to enter the password and the command execution will take place after that.
Errors:
Using getmac command we can retrieve the mac addresses of the machines running windows OS only. If you try this for a Linux machine you would get the error “The RPC server is unavailable.”
If you provide incorrect password, the command would fail with the error message “Logon failure: unknown user name or bad password.”
Also Read:
Windows CMD commands reference
{ 10 comments… read them below or add one }
How to get the mac addresses for a remote computer?
How to get the Mac Address
if the remote computer is on the same network segment then yours you can do this:
ping remoteComputerNameOrIpAddress
arp -a
“arp -a” should tell you which MAC address is associated with the remote computer’s IP address.
If the remote computer is not on the same network segment, I’m sorry but it is impossible (and it has no sense) to do this.
Totoche
physical address cmd what ????
Physical address is nothing but mac address. You can find it using getmac command as described above or you can also use ipconfig command for getting physical/mac address using command prompt.
Can you give me solution for below error. I am using Windows 7 32 bit OS . My system can’t read MAC ID.
When i run GETMAC , i can see Physical Address, But in Transport Name , it is Media disconnected.
My ISP is asking for MAC ID, which is given by me. But due to MEDIA DISCONNECTED Message ISP Can not read my MAC and i am unable to Use ISP Service.
Mac id is nothing but the physical address. You can reply them with whatever you see in physical address column.
you can get the mac of any device on the network by using the arp -a command.
Any device, not just windows, eg wireless camera. Hope this helps. Cheers
i try to read the mac by using the getmac command,
It is showing error “Error Intialized”
Can any one help me to fix these error.
OS – Windows XP
Nice Info.
However this does not work if you are trying to get Mac address of Dump devices like printers, switches, etc. Neither does ARP.