(imported topic written by rclarke)
Is there a way to return the total number of groups for which a computer is a member, regardless of whether they are manual or automatic groups?
Many thanks,
Rod.
(imported topic written by rclarke)
Is there a way to return the total number of groups for which a computer is a member, regardless of whether they are manual or automatic groups?
Many thanks,
Rod.
(imported comment written by SystemAdmin)
Hmmm, this is not going to be easy unfortunately.
For manual groups, a hidden action is created and BES Clients record the group in the registry. So, these would be easy to get counts for. A hidden fixlet is also created that doesn’t go to endpoints.
For automatic groups, a hidden Fixlet is created and computers that report relevant for the Fixlet are in the group. Here is a session inspector that gives computer names and the number of automatic groups the computer is a part of:
(name of it & ": " & number of relevant fixlets whose (group flag of it) of it as string) of BES Computers
So, you would need to create a property to return the number of manual groups the computer is in and then add the results of that property into the session inspector clause above.
Here is the client side relevance, create a property named “Manual Group Count” for it:
number of settings whose (name of it starts with
"__Group_0_" and value of it contains
"True") of client
The final session inspector clause to add in the results would be:
(name of it &
": " & ((number of relevant fixlets whose (group flag of it) of it) + (
if (exists results from (bes property
"Manual Group Count") of it) then (value of result from (bes property
"Manual Group Count") of it as integer)
else (0))) as string) of BES Computers
(imported comment written by rclarke)
Many thanks Tyler … something told me it wouldn’t be easy I will try this out and get back to you.
Rod.