Details of group membership (automatic/manual) against computer name

(imported topic written by Anuj_Attree91)

Hi,

We publish a report on weekly basis which includes compliance status of the entire organization. We’ve around 15 locations all over the country and want to publish the report geography wise. For this, we’ve created automatic groups in BigFix and each group refers to a location (there are sub groups as well).

The problem is i’m not able to fetch the group name/s a computer is member of from the relevance. I want to retrieve/fetch computer’s group membership, in the below given example i’m fetching computer’s ip address and other things but not able to include computer group membership section:

Desc: This will yield computer name, its ip address, and logged in user name of the computers having 192.168.90 in their ip address of all of the BigFix client computers

Rel:

(names of it, “—”, values of results(it, bes property “IP Address”), “—”, values of results(it, bes property “User Name”)) of bes computers whose (exists value whose ( it starts with “192.168.90”) of results(it, bes property “IP Address”))

The output will look like this:

UCP-NOC-NOCDB, —, 192.168.90.7, —,

UCP-NOC-SOLARWI, —, 192.168.90.4, —,

Please help…

(imported comment written by BenKus)

Nice work so far… your question turns out to be very tricky…

Here is what I have come up with so far:

(names of item 0 of it, ip addresses of item 0 of it, values of results(item 0 of it, bes property “User Name”), ((if (size of ((set of item 0 of it) - (member set of item 1 of it)) < size of member set of item 1 of it) then (name of item 1 of it) else nothings) of it)) of (bes computers, bes computer groups) whose (exists ip address whose ( it as string starts with “192.168.”) of item 0 of it)

See if that is on the right track for you…

Ben

(imported comment written by Anuj_Attree91)

Hi Ben,

Thank you so much…

The code provided by you is working but the problem is computer groups which are being return are not accurate.

for example, the computer MTPD4TAU529 doesn’t belong to “India NCR Unitech Support Desktop” group:

MTPD4TAU529, 192.168.73.48, Vijay, India NCR Unitech Support Desktop

MTPD4TAU529, 192.168.73.48, Vijay, India NCR Unitech Desktop

Please have a look…

Rgds,

Anuj

(imported comment written by BenKus)

My set logic was backwards… Try this:

(names of item 0 of it, ip addresses of item 0 of it, values of results(item 0 of it, bes property “User Name”), ((if (size of ((member set of item 1 of it) - (set of item 0 of it)) < size of member set of item 1 of it) then (name of item 1 of it) else nothings) of it)) of (bes computers, bes computer groups) whose (exists ip address whose ( it as string starts with “192.168.”) of item 0 of it)

Ben

(imported comment written by Anuj_Attree91)

Hi Ben,

Thanks, you make it like a pro…

Now i’m getting the correct data, but if we can concatenate the set of data in a single row for all the items like ip address, user name, or computer group name. Consider below given example, computer “MTPD4TAU529” is member of 2 computer groups “India International Group” and “India Support Desktop”. Same for “UCP-SUPP-244”.

MTPD4TAU529, 192.168.73.48, Vijay, India INternational Group

MTPD4TAU529, 192.168.73.48, Vijay, India Support Desktop

UCP-SUPP-244, 192.168.92.179, Mbatra, India NCR Unitech Support Desktop

UCP-SUPP-244, 192.168.92.179, Mbatra, India NCR Unitech Desktop

We need the data like:

MTPD4TAU529, 192.168.73.48, Vijay, India INternational Group; India Support Desktop

UCP-SUPP-244, 192.168.92.179, Mbatra, India NCR Unitech Support Desktop; India NCR Unitech Desktop

(imported comment written by Anuj_Attree91)

Hi Ben,

Now you do understand our requirements. Please help to get the group membership details as requested above…

Please let me know in case you need any information…

Rgds,

Anuj