Skip to content

Instantly share code, notes, and snippets.

@gregneagle
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregneagle/06c4d902771d9425c07b to your computer and use it in GitHub Desktop.
Save gregneagle/06c4d902771d9425c07b to your computer and use it in GitHub Desktop.
import subprocess
output = subprocess.check_output(['/usr/bin/profiles', '-C'])
for line in output.splitlines():
(stuff, label, profile_identifier) = line.partition(' profileIdentifier: ')
if label and profile_identifer.startswith('com.apple.mdm.mdm.educ.psu.edu'):
print profile_identifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment