Skip to main content
Question

Smart Group for User Initiated Enrolment?

  • Sep 12, 2018 12:55 PM UTC
  • 9 replies
  • 121 views

Forum|alt.badge.img+5

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.

9 replies

jbutler47
Forum|alt.badge.img+14
  • Valued Contributor
  • Oct 15, 2018 2:23 PM UTC

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.


Forum|alt.badge.img+10
  • Valued Contributor
  • Feb 4, 2019 7:06 PM UTC

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


jbutler47
Forum|alt.badge.img+14
  • Valued Contributor
  • Feb 4, 2019 9:20 PM UTC

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.


Forum|alt.badge.img+10
  • Valued Contributor
  • Feb 7, 2019 11:59 PM UTC

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


Forum|alt.badge.img+4
  • Contributor
  • Dec 17, 2019 2:21 PM UTC

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


Forum|alt.badge.img+4
  • Contributor
  • Dec 17, 2019 9:17 PM UTC

Try this:

!/bin/bash

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

Forum|alt.badge.img+4
  • Contributor
  • Dec 18, 2019 11:22 AM UTC

this works

thnx mnickels


cdenesha
Forum|alt.badge.img+14
  • Honored Contributor
  • Dec 26, 2019 2:37 PM UTC

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


Forum|alt.badge.img+1
  • New Contributor
  • Jan 15, 2025 10:39 PM UTC

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>"