Every so often, you may run across a Mac which is enrolled in an MDM server which is different from the one it should be. However, if you’re checking remotely, it may be difficult to identify which one it is.
To help with this task, there is a script available which will parse the MDM enrollment profile on your Mac and identify the DNS name of the MDM server. For more details, please see below the jump.
When run, the script should provide output similar to what’s shown below:
If enrolled with an MDM server:
username@computername ~ % sudo ./check_mdm_enrollment.sh Password: MDM server address: mdm.server.address.here username@computername ~ %
If not enrolled with an MDM server:
username@computername ~ % sudo ./check_mdm_enrollment.sh Password: Not enrolled in an MDM server. username@computername ~ %
The script is available below. It is also available from the following location on GitHub:
https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/check_mdm_enrollment