Skip to content

Instantly share code, notes, and snippets.

@acoomans
Forked from arainho/mdm_check.sh
Created April 18, 2024 01:49
Show Gist options
  • Save acoomans/f5a341649b6bfdaea3cc75e76b44cdcb to your computer and use it in GitHub Desktop.
Save acoomans/f5a341649b6bfdaea3cc75e76b44cdcb 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