How to create a query based on Direct membership is described here:
How to configure ConfigMgr collections to Active Directory containers is described here:
- Creating dynamic collections in ConfigMgr
- Configure dynamic collections in ConfigMgr
- Query ConfigMgr collections with Active Directory
In this blog I will describe how to create a new collection with Query rule.
First create a new collection in ConfigMgr and choose Membership rules based on Query rule. Click the [yellow database icon] and choose the query explained below. Choose "Dynamically add new resources" when using ConfigMgr R3 to automatically add new devices.
In this case I'm using a Resource class based on System Resource and "Edit Query Statement" for creating a new Query rule.
Select the Criteria tab and the [yellow star icon] for that. Click "Select" afterwards.
In this case I'm using a Attribute class based on System Resource and a Attribute based on "Operating System Name and Version".
When choose OK in the screen before (Select Attribute) the above screen will be displayed. Choose [Operator: Is Like] and Value based on Operating System variable here.
When choose OK in the screen before (Criterion Properties) the above screen will be displayed. Click OK afterwards.
The new collection with Query rule is ready now. All Windows 7 systems (in my case) will be automatically added in this new collection.
For new Windows releases use the following queries:
- Windows Vista: Value = %Workstation 6.0%
- Windows 7: Value = %Workstation 6.1%
- Windows 8: Value = %Workstation 6.2%
- Windows Server 2008: Value = %Server 6.0%
- Windows Server 2008 R2: Value = %Server 6.1%
- Windows Server 8: Value = %Server 6.2%
That way it's possible to create new collections with support on new Operating Systems. I will add support for new Operating Systems later when available.







Collections use WQL, not SQL - so the title of the article is wrong.
ReplyDeleteYou're right! I changed that in the blogpost already, but not in the title.
ReplyDeleteThanks for mentioning!