Skip to content

Instantly share code, notes, and snippets.

@arainho
Last active June 13, 2024 08:48
Show Gist options
  • Save arainho/3c1d6648815892005df11057768791c0 to your computer and use it in GitHub Desktop.
Save arainho/3c1d6648815892005df11057768791c0 to your computer and use it in GitHub Desktop.
Check whether DEP is present and MDM enrollment is user-approved.
#!/usr/bin/env bash
# Check if a machine was enrolled via DEP (10.13+)
# Show whether a machine has a device enrollment profile (DEP) present (10.13.0+),
# and if the MDM enrollment is user approved (10.13.4+)
/usr/bin/profiles status -type enrollment
# Checking for a DEP profile on macOS
# Display the DEP profile for a macOS device in 10.13 and above:
sudo /usr/bin/profiles show -type enrollment
# More info about Troubleshooting MDM (Device Enrollment Protocol)
# https://github.com/micromdm/micromdm/wiki/Troubleshooting-MDM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment