I work in an environment that utilizes OS X Server's NetBoot and NetRestore on a daily basis for preparing Macs for resale. I am working on a new, custom image for a customer that has a special request.
Instead of a simple netrestore of their desired configuration, they want us to collect the Mac Addresses and Serial numbers of all of the machines, and send it to them in an excel file. I am struggling with collecting this information in any automated way. We would look into Mac auditing software if this were a regular occasion, but this is only 40-50 units, a relatively small number for us, so it's basically a one-off. We would also consider using something like Apple Remote Desktop (ARD) for this, but we are regularly NetBooting or NetRestoring many other devices, so distinguishing what devices are part of this batch, and which ones aren't may prove to be difficult.
I see that in terminal there are ways to extract the serial numbers (and presumably mac addresses. this link provides an example of a script that collects serial number and model number http://community.spiceworks.com/topic/403719-mac-shell-scripting-naming-macs-based-on-what-model-they-are), but is there a way that with a similar script, just the serial and mac addresses can be appended to a log on a file share on the network? I want to limit the user interaction as much as possible to automate this process. I need it to be fool-proof as we have helpers that will be assisting us perform the restores that aren't as savvy, and we want it to be faster than going into system profiler and saving it that
TL;DR Anyone have any ideas on how to automatically collect Mac Addresses and serial numbers to a file for 40+ machines while netbooted or during a netrestore?