Smart Group for User Initiated Enrolment?

d_wilkins
New Contributor II

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.

8 REPLIES 8

jbutler47
Contributor II

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.

isaacnelson
Contributor

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

jbutler47
Contributor II

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.

isaacnelson
Contributor

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

ateazzie
New Contributor III

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

mnickels
New Contributor III

Try this:

!/bin/bash

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

ateazzie
New Contributor III

this works

thnx mnickels

cdenesha
Valued Contributor III

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