Skip to main content
Question

Smart Group for User Initiated Enrolment?

  • September 12, 2018
  • 9 replies
  • 38 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+13
  • Valued Contributor
  • October 15, 2018

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
  • February 4, 2019

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


jbutler47
Forum|alt.badge.img+13
  • Valued Contributor
  • February 4, 2019

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
  • February 7, 2019

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


Forum|alt.badge.img+4
  • Contributor
  • December 17, 2019

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
  • December 17, 2019

Try this:

!/bin/bash

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

Forum|alt.badge.img+4
  • Contributor
  • December 18, 2019

this works

thnx mnickels


Forum|alt.badge.img+14
  • Honored Contributor
  • December 26, 2019

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


Forum|alt.badge.img+1
  • New Contributor
  • January 15, 2025

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