Solved

apple script to collect wired and wireless mac address

Posted on 2009-05-11
4
857 Views
Last Modified: 2013-11-12
i'm sort of new to apple desktops and laptops, and looking for a way to collect the mac address of the wired and wireless network card of our machines, and then dump it to a text file on a file share, or email.

i know how to do it using a batch file in windows but obviously that wont work in os x.

any help would be greatly appreciated

thanks
0
Comment
Question by:jcox3
  • 2
4 Comments
 
LVL 5

Expert Comment

by:AGoodKeenMan
ID: 24359258
If you happy using the Terminal, you might want to have a look at the man page for system_profiler, i think it will output information to an xml file. Let me know if this helps, if not I can work something.
0
 
LVL 9

Accepted Solution

by:
heteronymous earned 500 total points
ID: 24360698
system_profiler can do it, but the output is going to be pretty verbose and with alot of extra(neous) info to parse.

You can get the info more directly via (the shell/bash) networksetup

We need to know a bit more about the hardware - namely, any MacPro towers ?
If not, (barring some really old machines) then they'll likely have only one (built-in) Ethernet port.

In which case you could use

sudo networksetup -getmacaddress Ethernet
sudo networksetup -getmacaddress AirPort

the rest is up to you to research and implement,
Apple's document on AppleScript and shell script interaction is here:

http://developer.apple.com/technotes/tn2002/tn2065.html
0
 
LVL 5

Expert Comment

by:AGoodKeenMan
ID: 24360998
Nice work. heteronymous is right, networksetup is a much better fit.
sudo networksetup -listallhardwareports > $HOME/Desktop/NetworkInfo.txt
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Unzip files in macOS Sierra - How? 4 60
Charging Macbook Pro 8 66
Hard Reset iPhone 11 39
2010 MacBook Pro super slow with software problems 5 26
Syslogd is a utility that traps and logs messages sent by running processes. It is configured with the syslog.conf file, which consists of lines containing a pair of fields: "the selector field which specifies the types of messages and priorities to…
This article describes in detail how to set up the iPad in the Enterprise using iPCU aka iPhone Configuration Utility.  This could also be used for the iPhone although I have not detailed out any differences. Preparation as an iPad Administrator:…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question