Use %username% variable as criteria in smart group

jdemuth
New Contributor

I'd like to create a mobile device smart group that checks to see if the the display name contains the username. My goal it to identify all the student iPads that don't contain the student's username as part of the name of the iPad.

2 REPLIES 2

Sichas
Contributor

I'm not sure that a Smart Group is the way to go here (not sure it's even possible) but what you COULD do is do an API script that would call down the name of the device, call down the username assigned, and then a bash command to see if the name string contains the username. If not, use another API command to toss them into a Static Group and then you'll have that list in the JSS.

For remediation you may find the MUT (available on the Mac App Store) exceptionally useful :)

blackholemac
Valued Contributor III

Assuming a properly configured LDAP....you could populate the “Title” field in your AD accounts with relevant data (we do staff, administration or the grad years for student accounts). Our AD title field maps to the position field in our server. Given that I can accurately target staff students or misc (no name) devices properly