A dynamic collection in Configuration Manager is based on WMI Query Language ( WQL ) queries. The membership of these collections updated dynamically based on the rules provided in WQL query. We can have one or multiple query rules in a collection.
Dynamic collections are useful for deployments as it save efforts to add the device manually in collection. The devices are automatically include or exclude from collection based on query rules.
In this blog post, we will provide step by step guide to create a dynamic collection. We will also discuss about Attribute Classes (SMS Provider WMI Class) and Attribute Names which can be used to create query based collections to achieve different requirements. For example, create a collection for the device build in last n number of days or create a collection for specific hardware model.
For this demonstration, we will create a collection for all devices in a Active Directory Organizational Unit ( OU ).
How to Create a Dynamic / Query Based Collection
In Configuration Manager console, go to Asset and Compliance , right click on Device collections and select Create Device Collection
In the General page, provide a collection Name and then click on Browse button under Limiting collection. Select the collection on which you want to limit the membership of your new collection.
Notes: A limiting collection restrict the membership to that particular collection. Your query based collection will be a subset of limiting collection.
In the Membership Rules page, click on Add Rule and select Query Rule from drop down list.
In the Query Rule Properties dialog box, enter a name for query rule and then click on Edit Query Statement.
In the Query Statement Properties dialog box, select Criteria tab and click on Add (Yellow Start) to add a new query rule.
In the Criterion Properties dialog box, select the following.
Criterion Type: Simple value
Where : Click on Select…
In the Select Attribute dialog box, select the following
Attribute class: System Resource
Attribute: System OU Name
Click on Ok to return to previous dialog box.
Back to Criterion Properties dialog box, select the following
Operator: is like
Value: Click on Value…
In the Values dialog box, you will see the list of all Active Directory OU which have been discovered as part of Active directory system discovery.
Select the desired OU and click on Ok to return to previous window.
Back on the Criterion Properties dialog box, verify the query rule and click on Ok.
You are now back to Query Statement Properties dialog box. Click on Ok to close the dialog box.
In the Query Rule Properties dialog box, click on Ok to return to Create Device Collection Wizard.
In the Membership Rules page, select Use incremental updates for this collection if you want to enable incremental updates.
Click on Next
In the Summary page, review the details and click on Next. The collection will now created and you will see a Progress and Completion page.
Different Attribute Classes and Attribute Names for Dynamic Collections
While creating the device collection in above demonstration, we have used below class and attribute to populate collection membership based on Active directory OU name.
Attribute class: System Resource
Attribute Name: System OU Name
Similarly, there are many SMS Provider WMI Server classes ( Attribute Classes) which can be used to create a device collection based on different criteria.
Other posts in this series
The below blog posts cover the details of classes which are mostly used for creating dynamic collection or SCCM queries. The process to create dynamic collection will be same as described above. You can simply select appropriate Attribute class and Attribute name as per your requirements. The posts also includes the complete queries which you can copy and paste to query editor to quickly create the collection.
- SCCM Collection Queries for System Resource Attributes
- SCCM Collection Queries for Operating System Attributes
- SCCM Device Collection Based on Computer Hardware Details
- SCCM Device Collection Based on Installed Software Products & Inventoried Files
- SCCM Collection based on OS Optional Features
Related Posts:
- How to Create Dynamic Collection in SCCM
- Enclosure Chassis Types Value & Description | ConfigMgr | SCCM
- ConfigMgr: Maintenance Window for member of specific collection – SQL Query
- SCCM Dynamic Collection for Windows 10 / 11 Devices
- SCCM Device Collection Equivalents in Microsoft Intune for App Deployment
- SCCM Dynamic Collection Based on Device Type | Collection Queries
- SCCM Collection Based on Operating System Optional Features
- SCCM Device Collection Based on Installed Software Products & Inventoried Files
- SCCM Device Collection Based on Computer Hardware Details
- SCCM Collection Queries for Opearting System Attribute Class
- SCCM Collection Queries for System Resource (SMS_R_System) Attribute Class
- SCCM Dynamic Collection using Application Deployment Status
- SCCM Dynamic Collection Based on Configuration Baseline Compliance Status
- How to Create , View and Organize SCCM Maintenance Windows
- How to Provision Windows 10 / 11 Device using Intune and Windows Autopilot
Subscribe to Techuisitive Newsletter
Be the first to know about our new blog posts. Get our newsletters directly in your inbox and stay up to date about Modern Desktop Management technologies & news.