Posted on 08-30-2013 01:46 PM
I would like to export all airport mac addresses so I can import them into our access point system to deny access is there a way to do this?
Thanks!!
Nicholas
Posted on 08-30-2013 03:38 PM
Do you have a mix of different machines? When I did this, I had to create an Extension Attribute that collected the Airport MAC address, as the "MAC Address" that's collected by default for a machine with both ethernet and Airport is the Ethernet one, which does me little good.
If you have just MacBoo Airs, then there's only a single MAC address and JSS will populate the primary "MAC Address" field with the Airport MAC.
Once you have the EA running, you can then set your Inventory Display preferences to display the Airport MAC address and then export to a .csv file, open it up in Excel, and then delete all the columns you don't need.
This is the script I put into an Extension Attribute to grab the Airport MAC address:
#!/bin/sh
echo "<result>ifconfig en1 | grep ether
</result>"
Posted on 09-01-2013 05:47 PM
Agreed with damien - We do exactly the same thing.
Script we use below, might be more reliable than above if you have Macs with multiple network adaptors across multiple versions of OS X.
#!/bin/sh
mac=networksetup -listallhardwareports | egrep -A 2 "(AirPort|Wi-Fi)" | grep Ethernet | awk '{print $3}'
echo "<result>$mac</result>"