How do I locate the MAC address of my computer?

88

21

I am unable to locate the MAC address in a new computer with Windows 7. I've tried ipconfig /all in the console to which I got no items match your search. I also tried getmac. A screen flashed very briefly with what appeared to be the information, but it was not there long enough to read.

Alibarsdad

Posted 2009-11-07T01:49:48.830

Reputation:

Answers

113

You have probably typed that into the Start Menu search dialog, which does execute the command but doesn't show it as the command prompt window disappears as soon as the command has been executed. This is the normal bahavior of command prompt applications, they close as soon as it is done.

In order for the command prompt to stay, you have to run those commands through the command prompt. The command prompt doesn't disappear after execution of a program; so, you can see the output as a result.

  1. Click the Start Button or press the Windows key.

  2. In the start menu search, type cmd.

  3. Hit Enter to execute the command prompt, or click on the cmd entry that appears.

  4. Type in ipconfig /all or getmac and it should execute both commands and the window will remain open such that you can see the output.

Note: getmac is great for just mac addresses ipconfig is good for ip addresses and ipconfig /all is great for IP address and a lot of other useless info (like unused connections)

to use getmac

  1. type cmd in the search box and press enter or run window (windows logo + r)
  2. then type getmac (no ipconfig necessary, in fact that wont work) and let it run (it may take a few seconds to rertrieve the info)

if you use ipconfig and ipconfig dose not have enough info use ipconfig /all

John T

Posted 2009-11-07T01:49:48.830

Reputation: 149 037

41

A simple way to get the MAC address(es) of your network adapter(s):

On a command prompt type

getmac

Example:

getmac mac address of network adapter

splattne

Posted 2009-11-07T01:49:48.830

Reputation: 14 208

3+1. I was not aware about this one. I always use ipconfig /all, but this is a lot easier. – JordyOnrust – 2010-02-21T21:59:19.047

1I think that the ethernet address will typically be first, and the wifi address will typically be second. – Clinton Blackmore – 2010-09-01T21:35:26.880

15Also, if you use getmac /v then it will show the name of the adapter and the connection state. Much easier if you have multiple network adapters, especially if you have some virtual ones from virtual machine software. – TuxRug – 2010-10-10T23:40:07.987

Does it work for interfaces that aren't connected? For some reason (or unreason ;-p), ipconfig never shows me the MACs of interfaces that are not connected. This may be the solution I'm looking for. – James Haigh – 2013-06-19T19:46:05.447

28

For Windows Vista and Windows 7, in the control panel:

Open the Network and Sharing Center > Local Area Connection > Details > Physical Address.

Network and Sharing Center MAC address

Molly7244

Posted 2009-11-07T01:49:48.830

Reputation:

2Annoyingly only accessible when connected, as is the MAC from ipconfig – a pain when I need the MAC of windows machines before they connect. – James Haigh – 2013-06-19T19:46:42.777

8

You can also locate the MAC address using VBScript:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select MACAddress from Win32_NetworkAdapter where DeviceID=1")
For Each objItem in colItems
    Wscript.Echo "MAC Address: " & objItem.MACAddress 
Next

user31894

Posted 2009-11-07T01:49:48.830

Reputation: 2 245

Well, it's a Window 7 question, so why bother writing a whoooole script when you can just type a command? – TFM – 2010-05-22T10:03:24.853

@TFM: Because the script can give you the MAC address only, while getmac requires output parsing... – Tamara Wijsman – 2012-02-24T22:11:33.630

2@TFM: That and WMI can be used over the network natively, without having to "reinvent the wheel" with SSH/psexec/WS-Remoting. Just change strComputer. – user1686 – 2012-02-24T22:13:39.593

3getmac does the same thing and is built into Windows. – MDMarra – 2009-11-09T12:07:38.953

8that's not called reinventing the wheel. That's called "there are many ways to do things". vbscript works almost in every version of windows , including Win9x. getmac is not available in every version. – user31894 – 2009-11-10T01:38:14.923

6

You can use the Get-NetAdapter PowerShell cmdlet.

It displays a nice table that identify each network interface with its MAC address.

enter image description here

Alex Jasmin

Posted 2009-11-07T01:49:48.830

Reputation: 462

What is the minimum required version of PowerShell? – Peter Mortensen – 2016-06-19T21:24:31.117

AFAIK the cmdlet was introduced in Windows 8.1. Upgrading PowerShell won't install it on older systems. – Alex Jasmin – 2016-06-21T14:02:56.060

1Only for Windows Server 2012 R2 and Windows 8.1. – harrymc – 2014-04-10T20:14:49.817