How Can I find what collections a collection is a member of

Patrick McCoy 1 Reputation point
2020-08-17T16:54:11.64+00:00

The question may sound odd, but I have taken over a location that manages software deployments for it's local area within a larger enterprise. My predecessor set up the majority of our collections and instead of deploying the software directly to our collections, he put them in the "Membership Rules" of the enterprise level.

Normally, you would go to the collection and click on the deployment tab to determine what is going on with the collection, but in this case, since there is no deployment to it, that tab is blank, along with most all other details.

Now, I have to back track and try to figure out which enterprise level collections all of our collections are a member of so I can at least note the collections so that me and anyone that needs to look can easily tell what the purpose of the collection is.

So, the question is just that. Other than going to each and every Enterprise Collection and looking at it's membership rules to see if one of our local collections is listed, Is there a way via Script or GUI that will tell me what collections a specific collection is a member of, similar to how you can see what collections a machine is a member of?

Microsoft Security | Intune | Configuration Manager | Other
{count} votes

1 answer

Sort by: Most helpful
  1. AllenLiu-MSFT 49,316 Reputation points Microsoft External Staff
    2020-08-18T02:15:01.833+00:00

    Hi,

    You may try the sql query to get what collections limit your collection, include your collection and exclude your collection.
    Just modify the DependentCollectionID of your collection ID, or remove the last line "where DependentCollectionID='xxxxxxxx'" to get results for all of your collections:
    select
    v_Collection.name,
    SourceCollectionID,
    Case
    When vSMS_CollectionDependencies.relationshiptype = 1 then 'Limited To'+SourceCollectionID
    when vSMS_CollectionDependencies.relationshiptype = 2 then 'Include'+SourceCollectionID
    when vSMS_CollectionDependencies.relationshiptype = 3 then 'Exclude'+SourceCollectionID
    end as "Type of Relationship"
    from v_Collection
    join vSMS_CollectionDependencies on vSMS_CollectionDependencies.DependentCollectionID = v_Collection.CollectionID
    where DependentCollectionID='xxxxxxxx'

    18181-22.jpg

    Regards,
    Allen


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.