Smart Groups

NaomiT
New Contributor

I am trying to create smart groups that group together Macs by computer name or enrollment method.

For example I would like the smart group to identify all Merry Oaks HS Macs. It should group together all Macs that have the naming convention for the school that starts with 31203... or enrolled with Merry Oaks HS' prestage enrollment.

The issue I am having is that whether I assign the smart group a site or not it still does not list the correct number of Macs. I know the current version of JSS does not allow wild card options to allow Smart groups to identify Macs that either start or end with a set of number or letters.

Does anyone have any suggestions?

2 REPLIES 2

mm2270
Legendary Contributor III

Do all your school naming conventions have the same number of characters as the designation? For example, in the example above, you state that a school uses "31203" as the code, and therefore the assigned computer name starts with that. Do they all follow that model that the first 5 characters designate the school name the Mac belongs to?

If the answer to the above is yes, then I would suggest setting up an Extension Attribute that will grab the first 5 characters of the assigned Mac name and place that into the result. Once that's set up, you'll then be able to use an exact match, or "is" instead of using "like" which can end up sometimes grabbing systems you don't want to grab into the Smart Group.
You didn't mention if the issue is that the Smart Group is getting too many Macs or not enough Macs. If it's the former, then the above may help. If it's the latter, I doubt it will make any difference, in which case you may need to figure out why it's not matching up.

One thing to keep in mind is that Smart Groups can only get managed machines/devices in them, so if the discrepancy is only off by a little, is it possible you have a few machines that aren't managed in your JSS?

Also, I thought we were able to use Prestage enrollment as criteria to search on or build SGs on? Is that not the case? If it isn't, then that needs to be a thing.

NaomiT
New Contributor

@mm2270 Yes each of our schools have their own site code and the same number of characters in the naming convention.

Ok I will look into setting up an extension attribute. When I add a site to the smart group there are no Macs listed, then when I add a site it lists about 37. In this example the smart group should have only listed 1 Mac.

As you mentioned since the numbers are completely off it does not look like an issue with managed /unmanaged Macs in the JSS.

I mentioned in the original post that I have prestage enrollment as a criteria as well.