Skip to content

Instantly share code, notes, and snippets.

@matthewbodaly
Last active April 5, 2017 19:24
Show Gist options
  • Save matthewbodaly/f7071edb7332f95935d7321a4ed9aa50 to your computer and use it in GitHub Desktop.
Save matthewbodaly/f7071edb7332f95935d7321a4ed9aa50 to your computer and use it in GitHub Desktop.
DEP Debugging
#!/bin/bash
# Step 1: Enable the Debug Log
# In Terminal run the following 3 commands:
sudo defaults write /Library/Preferences/com.apple.MCXDebug debugOutput -2
sudo defaults write /Library/Preferences/com.apple.MCXDebug collateLogs 1
sudo touch /var/db/MDM_EnableDebug
# Step 2: Re-enroll the DEP Computer Without Wiping
# In Terminal run the following 4 commands:
sudo rm /var/db/.AppleSetupDone
sudo rm -rf /var/db/ConfigurationProfiles/
sudo rm /Library/Keychains/apsd.keychain
# Reboot the machine and re-enroll via DEP
reboot -r now
# Log is written to: /Library/Logs/ManagedClient/ManagedClient.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment