Closed feolaney closed 1 year ago
Makes sense, will look into adding this functionality!
Thanks!
This has been fixed in ef67d8835844e6c79baba1afbb4b95e46827ad15
This is great news! Just curious; how many iterations does it go through to look for nesting? In my internal scripts I go three-deep, because I didn't find any instances where there were groups more nested than that.
Hi @grahampugh!
My implementation is quite naive: I am looking for Computer Groups or Mobile Device Groups where the value is a "member of" a particular Smart Group. Anything that matches is deemed linked / in-use.
Example where all Smart Groups are linked / in-use (more or less the same as my unit tests):
Name "Computer Group" type "member of" value "Smart Group 3"
Name "Computer Group" type "member of" value "Smart Group 2"
Example where Smart Groups 1 and 2 are linked / in-use, and Smart Group 3 is not linked / in-use:
Name "Computer Group" type "member of" value "Smart Group 1"
, in scope of multiple policiesSo in answer to to your question, 1 level deep? Am I missing some additional criteria / steps that I should be testing against?
Happy to be schooled educated by someone that might use Jamf Pro more than I do these days 😃
Ah, actually thinking about it, of course that's enough for finding unused groups. I was thinking about the scripts that I wrote for copying a group or policy to a new Jamf instance with all its dependencies - completely different thing! Sorry, pre-coffee nonsense.
Smart Groups that are nested in other Smart groups show up as not being linked to any Policies.
Jamf (depending on your version) will prohibit the deletion of groups that have other Smart Groups dependent on them. For these reports though, it makes it seem like certain smart groups are unused or not scoped when in actuality they can be by association with the parent Smart Group