≡ Menu

Get mac address from command line (CMD)

We can find mac address (physical address) of a computer 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. Further, I have received comments that this command does not help identify the mac address for a specific device. For example, if I need to get the mac address for my WiFi card, output of getmac command is not helpful. We can use ipconfig command to deal with this.

C:\>ipconfig /all
Windows IP Configuration
   Host Name . . . . . . . . . . . . : PC-10234
   Primary Dns Suffix  . . . . . . . : mydomain.com
   
   DNS Suffix Search List. . . . . . : mydomain.com
                                       mydomain.com
Wireless LAN adapter Wireless Network Connection:
   Connection-specific DNS Suffix  . : mydomain.com
   Description . . . . . . . . . . . : Intel(R) Centrino(R) Advanced-N 6205
   Physical Address. . . . . . . . . : 3C-99-88-64-A1-F0
   
Ethernet adapter Local Area Connection:
   Connection-specific DNS Suffix  . : mydomain.com
   Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection
   Physical Address. . . . . . . . . : 73-2B-4F-D5-12-A0
  
C:\>

Get mac address of a remote computer

We can retrieve the mac addressses for a remote computer using nbtstat command.
Example:

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 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

{ 27 comments… add one }
  • Bruce

    How to get the mac addresses for a remote computer?

    • tahir

      How to get the Mac Address

  • Totoche

    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

  • balamurugan

    physical address cmd what ????

    • admin

      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.

  • HARSH SHAH

    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.

    • admin

      Mac id is nothing but the physical address. You can reply them with whatever you see in physical address column.

  • jonnyxx

    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 :)

  • logesh

    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

  • Amit

    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.

  • Jake

    You can also use nbtstat -a ipaddress or nbtstat -a hostname

    • Arvind

      Thanks Jake, you hit the nail. This is what solved my problem. Cheers

    • Rini

      Exactly ! worked for me

  • ihsan

    if there are 200 users on a DHCP server in a network are u have been told that find the ip,s and as well as the mac address,s of the machines………what should be the procedure to it?

  • drikus

    Good day. I need to find a mac adress of a remote site sagem ma500. Can see it on the system but remote log on by sagem check do not give the mac adress. I am on a different ip range as the device. What program can i down load. the above will not work for this device.

    Thank you

  • Ravi

    I’m using windows 8.1 and when I am hitting enter after typing ipconfig /all it is showing that ‘ipconfig’ is not recognized as an internal or external command what should I do now ??

    • Manuel Carrero

      Make sure you are running as administrator just go to the bottom left corner of your screen and right click, on the menu select Command Prompt (Admin)

  • jack

    how find wireless mac address?

  • Mark Roberts

    When i run the Getmac command it returns 3 mac addresses. Which one is correct? What are the other 2 Mac addresses listed and what order do they appear in ?

    • mol

      M. Roberts, Good question. I am wondering the same thing. How do I know,which is the correct address for my laptop. Which do I use?

      thanks!

    • Dave

      Just use getmac /v <—— the /v means Verbose
      add the /fo list

      getmac /v /fo list
      
      Connection Name:  Wi-Fi
      Network Adapter:  Intel(R) Wireless-N 7260
      Physical Address: 0C-8B-4D-65-58-63
      Transport Name:   \Device\Tcpip_{6C794E1E-AA8D-4D22-8947-7C8F491B9519}
      
      Connection Name:  Ethernet
      Network Adapter:  Realtek PCIe GBE Family Controller
      Physical Address: 08-9E-01-EB-44-67
      Transport Name:   Media disconnected
      
      Connection Name:  Bluetooth Network Connection
      Network Adapter:  Bluetooth Device (Personal Area Network)
      Physical Address: 0C-8B-F5-65-58-6D
      Transport Name:   Media disconnected
  • Ali

    That’s not helpful :( ! because it does not specify which mac goes to which device. e.g. mine shows 7 devices while i want to know lan’s

    • admin

      ipconfig /all helps to identify the mac address for each device.

    • Ali

      that’s great! thank you

  • Nonso

    How do i use arp -a to determine a duplicate ip

  • rajvir

    Can u ppl please confirm till how much time the MAc address with Ip will be present in the routing table of system ?

  • m k

    Thanks a lot

Leave a Comment

Advertisment ad adsense adlogger