You are on page 1of 17

3/25/2020 Get mac address from command line (CMD)

≡ MENU

Windows Commands, Batch files, Command prompt and PowerShell

Get mac address from command line (CMD)


by SRINI

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.

Get mac addresses from CMD


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

https://www.windows-commandline.com/get-mac-address-command-line/ 1/17
3/25/2020 Get mac address from command line (CMD)

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.

PAYPAL MAKES
IT POSSIBLE
Start shopping

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

https://www.windows-commandline.com/get-mac-address-command-line/ 2/17
3/25/2020 Get mac address from command line (CMD)

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.

Get more from a website.


AdJoin the ranks of high-performing
Ad websites. Our data-driven action…
GoDaddy

Start for Free

Alternatively, We can run the below command to retrieve the mac addresses of a remote
computer.

getmac /s remote_computer /u username /p password


https://www.windows-commandline.com/get-mac-address-command-line/ 3/17
3/25/2020 Get mac address from command line (CMD)

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

https://www.windows-commandline.com/get-mac-address-command-line/ 4/17
3/25/2020 Get mac address from command line (CMD)

34 comments… add one

Bruce

How to get the mac addresses for a remote computer?

REPLY LINK

tahir

How to get the Mac Address

LINK

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.

https://www.windows-commandline.com/get-mac-address-command-line/ 5/17
3/25/2020 Get mac address from command line (CMD)

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

REPLY LINK

balamurugan

physical address cmd what ????

REPLY LINK

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.

LINK

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.

REPLY LINK

admin

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

https://www.windows-commandline.com/get-mac-address-command-line/ 6/17
3/25/2020 Get mac address from command line (CMD)

LINK

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

REPLY LINK

rockman510

Thank you! arp -a [IP] was exactly what I needed to find the MAC of a printer I was
looking for.

LINK

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

REPLY LINK

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.

REPLY LINK

https://www.windows-commandline.com/get-mac-address-command-line/ 7/17
3/25/2020 Get mac address from command line (CMD)

Jake

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

REPLY LINK

Arvind

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

LINK

Rini

Exactly ! worked for me

LINK

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?

REPLY LINK

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

REPLY LINK

Ravi
https://www.windows-commandline.com/get-mac-address-command-line/ 8/17
3/25/2020 Get mac address from command line (CMD)

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

REPLY LINK

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)

LINK

jack

how find wireless mac address?

REPLY LINK

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 ?

REPLY LINK

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!

LINK

Dave

https://www.windows-commandline.com/get-mac-address-command-line/ 9/17
3/25/2020 Get mac address from command line (CMD)

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

LINK

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

REPLY LINK

admin

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

LINK

https://www.windows-commandline.com/get-mac-address-command-line/ 10/17
3/25/2020 Get mac address from command line (CMD)

Ali

that’s great! thank you

LINK

Nonso

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

REPLY LINK

rajvir

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

REPLY LINK

mk

Thanks a lot

REPLY LINK

Dexter

I have a question. What does the Transport Name really mean, its use? Is it unique and two
devices can never have same Transport Name? Can it be spoofed?

REPLY LINK

Rajkumar Swami

I have mac address of device. How to get IP address of a device based on mac address?
https://www.windows-commandline.com/get-mac-address-command-line/ 11/17
3/25/2020 Get mac address from command line (CMD)

REPLY LINK

Jang

how to know the mac address of my neighbors’ wifi? please help

REPLY LINK

Krix

How do you get the mac address of your own computer from the cmd

REPLY LINK

Will

Hi can i ask when i type in the command arp -a :

So it shows the physical address, internet address n the type

So question is 1. what will be the mac address then?


2. how many mac address(or physical address) were learned and cached in the pc

Hope u can reply to this message asap.

REPLY LINK

AFF

Hi, is there any way to get a mac address of an ethernet device that was previously
connected to my computer?? The device that I’m trying to find is a Mikrotik that was stolen
from my roof…

Thanx in advance!!

https://www.windows-commandline.com/get-mac-address-command-line/ 12/17
3/25/2020 Get mac address from command line (CMD)

REPLY LINK

Leave a Comment

Name *

Email *

Website

Comment

Submit

To search, type and hit enter

M ORE R ECENT P OSTS


How to check if Windows 32 or 64 bit?

Get Windows install date

User questions about fixing javac not recognized error


https://www.windows-commandline.com/get-mac-address-command-line/ 13/17
3/25/2020 Get mac address from command line (CMD)

How to Kill process from PowerShell

Fix WMIC invalid alias verb error

How to remove user login password from command prompt

Run command for performance monitor

PowerShell – Failed to update help for the modules

Run command for remote desktop (RDP client)

Find saved outlook emails

E-mail Newsletter

E-mail Subscribe

https://www.windows-commandline.com/get-mac-address-command-line/ 14/17
3/25/2020 Get mac address from command line (CMD)

PAYPAL MAKES
IT POSSIBLE
Learn More

C ATEGORIES
Automation (2)

Batch Files (9)

Command Line Errors (2)

Command prompt (3)

Directories (5)

Download (1)

Files (31)

Java (2)

Network (6)

https://www.windows-commandline.com/get-mac-address-command-line/ 15/17
3/25/2020 Get mac address from command line (CMD)

PowerShell (5)

Remote access (7)

Run commands (28)

System Configuration (28)

System information (21)

Uncategorized (43)

User Accounts (23)

User Settings (9)

Windows Commands (33)

Windows shortcuts (4)

WMIC (1)

https://www.windows-commandline.com/get-mac-address-command-line/ 16/17
3/25/2020 Get mac address from command line (CMD)

PAYPAL
MAKES IT
POSSIBLE
Start shopping

https://www.windows-commandline.com/get-mac-address-command-line/ 17/17

You might also like