Skip to main content

Is there any way to detect if a computer was enrolled through User Initiated Enrolment?



JAMF Pro Cloud 10.6
10.13.4 Clients



the only way I can think of is to use exclusions for other enrolment methods i.e DEP but I am very reluctant to use Exclusions.

Just posted a support ticket to get some options from JAMF about the very same need on my end,



You cannot reverse DEP enrollment criteria because that will include any machines imaged with JAMF Imaging and those processed via User-Initiated enrollment (either 10.13 or higher, or 10.12 or lower).



After two go-arounds with JAMF techs, they were stumped. Awaiting their reply.



Will share if I learn more.


@jbutler47 were you ever able to figure out a way to do this?


The following EA seems to do the trick, only for macOS 10.13.2 and above.



!/bin/bash



enrollType=“profiles status -type enrollment“
echo "<result>$enrollType</result>"



CLI: profiles status -type enrollment



Muchas Gracias to JAMF trainer Chris for his much-needed assistance.


Awesome! Thank you @jbutler47 (and Jamf trainer Chris)!


this would help me tremendously, I tried it but it doesn't show anything
Made a new EA with these lines
!/bin/bash
enrollType=“profiles status -type enrollment“
echo "<result>$enrollType</result>"



am I missing something? We're on jamfpro 10.17
thnx for the help


Try this:



!/bin/bash

enrollType=$(profiles status -type enrollment)
echo "<result>$enrollType</result>"

this works



thnx mnickels


also change top of script to #!/bin/bash


This is great! I only needed the first line so I modified as such. 


 


#!/bin/bash

enrollType=$(profiles status -type enrollment | head -1)
echo "<result>$enrollType</result>"