Required: osquery deployed with Orbit, or manual installation of macadmins/osquery-extension. Checks that a mac is enrolled to MDM. Add a AND on identity_certificate_uuid to check for a specific MDM.
Create or edit a configuration profile with the following information:
Create or edit the following script and configure it to run when the check fails:
Use the policy below to verify:
SELECT 1 from mdm WHERE enrolled='true';
if profiles status -type enrollment 2>/dev/null | grep -qi "Enrolled"; then echo 1; else echo 0; fi
PowerShell commands are currently work in progress, contributions welcome.
Bash commands are currently work in progress, contributions welcome.