How to get MAC address from command line / batch file in Vista?

Joined
Sep 9, 2009
Messages
4
Reaction score
0
i use getmac command only bu it display some garbage with it , i want to get exactlymac address not long numbers like device tcp ip bla bla bla i want show the user only the mac address which is 12 digits at middle of the screen

for example your mac addreess is 01-10-10-10-10-11
 
Joined
Jan 23, 2013
Messages
1
Reaction score
0
I know this is an old post, but thanks for this info. I had a predicament of having multiple "Local Area Connection" types listed (i.e. Local Area Connection, Local Area Connection 2, etc), so I had to modify this a bit.

What's more, I tried "Intel" for the findstr argument and it still was outputting two MAC addresses (due to one Intel wi-fi adapter and the Intel 82579LM Gigabit Ethernet adapter). The solution for this was to limit it to the model number of the Intel Gigabit Ethernet adapter (82579LM) in the findstr argument, like this:

for /f "tokens=3 delims=," %%a in ('"getmac /v /fo csv | findstr 82579LM"') do echo MAC Address: %%a

This outputs the one MAC address for the proper Local Area Connection that uses the Intel 82579LM Gigabit Ethernet adapter.

Hope this helps someone a bit more at least.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top