Last active
August 29, 2015 14:02
-
-
Save rustymyers/f245c42f784b13fe4b48 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python | |
import os | |
# import subprocess | |
# import re | |
ProfileInstalled = False | |
getprofile='/usr/bin/profiles -C' | |
print("GetProfile: "+getprofile) | |
profileDump = os.popen("/usr/bin/profiles -C") | |
for line in profileDump: | |
if "com.meraki.smasdf" in line: | |
ProfileInstalled = True | |
# Split the line into three parts | |
lineSplit = line.rsplit(":") | |
# Set the third element as variable | |
profileName = lineSplit[2] | |
if ":" in line: | |
print("Found profile: {0}".format(profileName)) | |
#os.system("/usr/bin/profiles -R -p "+profileName) | |
if ProfileInstalled == False: | |
print("There are no Apple Profile Manager Profiles installed on the system. Uninstall not Required.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment