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

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

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

Get mac address of a remote computer

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

C:\>nbtstat -a
Local Area Connection:
Node IpAddress: [] Scope Id: []
           NetBIOS Remote Machine Name Table
       Name               Type         Status
    7CF71D1C3B05   <00>  UNIQUE      Registered
    MAC Address = 00-00-00-00-00-00
Wireless Network Connection:
Node IpAddress: [] Scope Id: []
           NetBIOS Remote Machine Name Table
       Name               Type         Status
    7CF71D1C3B05   <00>  UNIQUE      Registered
    MAC Address = 7C-F7-1D-1C-3B-05
Local Area Connection 2:
Node IpAddress: [] 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.


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.


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 September 3, 2011, 6:37 pm

    How to get the mac addresses for a remote computer?

    • tahir February 3, 2012, 3:52 am

      How to get the Mac Address

  • Totoche September 6, 2011, 4:09 pm

    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.


  • balamurugan November 3, 2011, 5:20 pm

    physical address cmd what ????

    • admin January 4, 2012, 4:58 am

      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 March 14, 2012, 3:59 pm

    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 March 14, 2012, 5:16 pm

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

  • jonnyxx April 1, 2012, 9:49 am

    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 August 4, 2012, 11:45 am

    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 February 20, 2013, 11:00 pm

    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 May 31, 2013, 6:06 pm

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

    • Arvind June 20, 2013, 12:11 am

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

    • Rini May 28, 2015, 7:49 am

      Exactly ! worked for me

  • ihsan February 17, 2014, 9:28 am

    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 February 21, 2014, 11:37 am

    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 March 19, 2014, 4:52 pm

    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 December 3, 2014, 11:40 pm

      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 April 18, 2014, 12:04 pm

    how find wireless mac address?

  • Mark Roberts May 20, 2014, 9:40 pm

    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 September 15, 2014, 6:58 pm

      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?


    • Dave January 25, 2015, 12:08 am

      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 January 9, 2015, 3:26 pm

    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 January 15, 2015, 12:30 am

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

    • Ali January 29, 2015, 10:54 pm

      that’s great! thank you

  • Nonso September 29, 2015, 3:33 pm

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

  • rajvir February 5, 2016, 12:56 am

    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 July 14, 2016, 9:45 am

    Thanks a lot

Leave a Comment