MDM Logs

While recently troubleshooting an issue with DEP enrollment initiation, I was given instructions on how to enable and capture mdm logs on new device during the Setup Assistant process.

Networked machines would intermittently display the enrollment prompt at the Setup Assistant.

The resultant logs from these steps should help you determine the source of DEP enrollment failure, network or otherwise.

Steps to configure mdm logging:

You will need a new or freshly imaged Macbook to test with.

  • Boot this machine into target disk mode by holding down “T” during boot.

  • Connect the test machine to a host MacOS device.

  • In terminal run diskutil list to view a list of connected devices.

  • Note the volume name and cd into /Volumes/Your Test Volume Name/Library/Preferences

sudo defaults write com.apple.MCXDebug debugOutput -2

sudo defaults write com.apple.MCXDebug collateLogs 1

  • Now cd into /Volumes/Your Test Volume Name/var/db

sudo touch /var/db/MDM_EnableDebug

  • Reboot and attempt to run through the DEP enrollment process.

  • Boot machine back in to target disk mode and find the following log file:

cat /Library/Logs/ManagedClient/ManagedClient.log