Created
June 6, 2019 20:30
-
-
Save AndrewWCarson/3385e44f07b08784576a64860592c6ac to your computer and use it in GitHub Desktop.
Outputs True/False based on the device "Supervised" status (determined by whether the device has gone through Device Enrollment provisioning).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if /usr/libexec/mdmclient QuerySecurityInfo | grep -m1 EnrolledViaDEP | grep 1 >&/dev/null; then | |
echo "True" | |
else | |
echo "False" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is particularly useful now that macOS Catalina differentiates between UAMDM and "Supervised" Mac devices. For instance, the new
Get the Bypass Code for Activation Lock
is only compatible with Supervised devices (https://developer.apple.com/documentation/devicemanagement/get_the_bypass_code_for_activation_lock).