bplotnick, The snippet below will get you the serial number:
serial=$(system_profiler SPHardwareDataType | grep 'Serial Number
(system)' | awk '{print $NF}')
Deano, What you're describing would be fantastic, but it's not possible
at this time. And just to clarify, you can only run policies on
Computers, not Mobile Devices. Jon