Mac OS X, Mac OS X Server, Mac Security, Mass Deployment Programmatically Grab The Name Of Your MDM Enrollment Profile In OS X August 20, 2016 Just a quick one-liner. Enjoy. profiles -Cv | grep Enrollment | awk '{ s = ""; for (i = 5; i <= NF; i++) s = s $i " "; print s }'