Direct Collection Memberships
There are a number of best practices to follow in order to ensure that collection evaluation times run as quickly as possible. There are a number of guidelines to follow but not all are obvious.
In this blog post I want to go into why you should avoid using Direct Members in collections and how you can identify the number of direct members in each collection across your estate. As an example, suppose you have a collection which contains 1000 direct members.
- Every time a new direct member is added to a collection, it is classed as a new rule. Where means that each time it is evaluated it is added to memory. The more direct members you have the more rules are loaded into memory. So for example if you have a collection with 1000 direct members then you will be evaluating against 1000 unique rules.
- Every time you add a new device to that collection, this forces SCCM to reevaluate the collection as a priority. This means all rules will be processed. So adding one additional device to collection will now mean 1001 rules will be evaluated.
To identify Direct Rules in your organisation, run the following command;
Direct Membership Collection Query
SELECT COUNT (*) AS DirectMembers, vc.membercount AS TotalMembers, vc.Name
FROM v_CollectionRuleDirect AS VCD
INNER JOIN v_Collection AS VC ON VC.CollectionID = VCD.CollectionID
/* Optional to add filter add in - WHERE NAME like '%'*/
GROUP BY VC.Name, vc.membercount
ORDER BY DirectMembers DESC