Apr 04, '11 07:30:00AM • Contributed by: timmy_pete
Unfortunately, this isn't printed on the box, and Apple's iPhone Configuration Utility offers no way to do a bulk export particular details beyond the UDID of an iPad, iPhone or iPod touch.
I worked out how to do so on the command line and want to document the knowledge, as pasting them one at a time from IPCU isn't practical for any large scale deployments and I've seen no reference anywhere online to find out where iPhone Configuration Utility obtains its information.
I first ran iTunes in activation-only mode to activate the devices. You can enable this mode by entering the following command in Terminal:
defaults write com.apple.iTunes StoreActivationMode -integer 1
I then connected each iPad while iTunes was running in activation-only mode and gradually gained an entry for each device, sorted by UDID, in ~/Library/MobileDevice/Devices/ that contains the information displayed by the IPCU.
Once all devices were added, I ran the following command in Terminal to put in my clipboard the serial number and MAC address, sans colons, of each iPad 2 that has been connected whilst this account was logged in.
grep -r -i -h -B 3 -A 2 ipad2 ~/Library/MobileDevice/Devices | sed -n '/^$/!{s/<[^>]*>//g;p;}' | tr -d '\011' | sed 's/://g' | grep -v -e deviceSerialNumber -e deviceType -e deviceWiFiMACAddress -e iPad -e -- | sed '$!N;s/\n/ /' | pbcopy
Unfortunately I need to run IPCU on each iPad again to install a configuration profile for our Mobile Device Management (MDM) suite (Jamf's Casper Suite 8.1), as Casper couldn't phone home or download the required certificates without WiFi access. Unless someone suggests otherwise, I think this is the easiest way to proceed, even if it involves plugging into a device twice.
You should be able to modify the script to get other information by first reviewing a sample file in ~/Library/MobileDevice/Devices and amending as you see fit. You'd also be able to change the reference to iPad2 in your first command to get other devices' details. Ideally, it should be possible to export this kind of information from IPCU as it is Apple's supposed solution to enterprise deployment issues. We can also pull up this kind of information in Casper, but an inventory will only occur when we have wireless access, and for a range of reasons it isn't possible to temporarily disable MAC address filtering in our environment without major headaches.
This was tested on 10.6.6 with the current version of the IPCU. Your mileage may vary a bit, though I doubt too much would change in the way these files are structured. For those who are interested, I ran fs_usage as root and opened IPCU, grepping for IPCU processes eventually pointed to the location of the information I wasn't able to find earlier. This location has much more information present than /Library/Preferences/com.apple.iPod.plist does.
[crarko adds: I haven't tested this one. I think we can all agree that Apple's tools and documentation for large-scale deployments are in serious need of work.]
