Skip to content

Instantly share code, notes, and snippets.

@matthewbodaly
Created January 29, 2016 00:09
Show Gist options
  • Save matthewbodaly/218235578e42625bcc23 to your computer and use it in GitHub Desktop.
Save matthewbodaly/218235578e42625bcc23 to your computer and use it in GitHub Desktop.
#!/bin/sh
#enable logging
defaults write /Library/Preferences/com.apple.MCXDebug debugOutput -2
defaults write /Library/Preferences/com.apple.MCXDebug collateLogs 1
touch /var/db/MDM_EnableDebug
#reset DEP
rm /var/db/.AppleSetupDone
rm -rf /var/db/ConfigurationProfiles/
rm /Library/Keychains/apsd.keychain
# Remove JAMF Framework
jamf removeFramework
# Reboot the machine and re-enroll via DEP
shutdown -r now
#* Log is written to: /Library/Logs/ManagedClient/ManagedClient.log
@matthewbodaly
Copy link
Author

the
jamf removeFramework can/should be commented out if you have a different MDM provider. I did this in a JAMF environment so... uncommented. /shrug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment