Last active
November 9, 2016 18:40
-
-
Save BaddMann/f7d7d641fa3ef6c1bee451de8863be5d 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/bin/env python | |
import plistlib | |
import os | |
from Foundation import CFPreferencesCopyAppValue | |
# Read the location of the ManagedInstallDir from ManagedInstall.plist | |
BUNDLE_ID = 'ManagedInstalls' | |
pref_name = 'ManagedInstallDir' | |
managedinstalldir = CFPreferencesCopyAppValue(pref_name, BUNDLE_ID) | |
# Read Munki's Report | |
ManagedInstallsReportitemspath = os.path.join(managedinstalldir, 'ManagedInstallReport.plist') | |
#Retrive Important Values, add strings for Jamf if needed. | |
pref_name_now = 'Warnings' | |
munkiwarnings = CFPreferencesCopyAppValue(pref_name_now, ManagedInstallsReportitemspath) | |
pref_name_now = 'Errors' | |
munkierrors = CFPreferencesCopyAppValue(pref_name_now, ManagedInstallsReportitemspath) | |
print "Munki Warnings:", munkiwarnings | |
print "Munki Errors:", munkierrors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment