WMI class for_CollectionRule
Currently it is not possible to efficiently query for properties of a collection membership rule. In the SDK the membership rules are a lazy property of the collection and must be retrieved one at a time before they can be tested. This iteration is impossibly slow and inefficient. If there was a SMS_CollectionRule WMI class then one could use a join query to search for Collections based on rule properties. In a real world situation, this would enable tools to quickly select a collection and find which collections it is a member of. This is really needed where collections are used to deploy software at an educational instutute where classroom based collections are included as members of software deployment collections. At the moment this information can only be effectively retrieved by directly querying the SQL server:
SELECT CollectionName, CollectionComment, QueryName FROM vCollections
JOIN CollectionRules on vCollections.CollectionID = CollectionRules.CollectionID
WHERE collection_rules.QueryName like '%MyCollection%'