Home > Mac administration, macOS, Mobile Device Management, Scripting > Identifying which MDM server a Mac is enrolled with

Identifying which MDM server a Mac is enrolled with

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 ~ %

Screen Shot 2020 03 18 at 12 09 09 PM

 

If not enrolled with an MDM server:

username@computername ~ % sudo ./check_mdm_enrollment.sh
Password:
Not enrolled in an MDM server.
username@computername ~ %

Screen Shot 2020 03 18 at 12 12 07 PM

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

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: