In this post, I’ll walk you through the process of creating a SCCM device collection for Windows 10 computers. Using WQL queries, you can create Windows 10 SCCM device collections, such as collections for Windows 10 versions 21H2, 22H2, 21H2, and 20H2.
In SCCM, a query is a specific set of instructions that extract information about a defined set of objects. You can create queries and store them in the Configuration Manager site database. By running a query, you search the database for information about the objects that match the query criteria.
Configuration Manager comes with just a handful of queries out-of-the-box that illustrates a small part of the rich amount of data available. Microsoft has picked 10240 as the final build number of Windows 10.
If you are managing Windows 11 using SCCM, you can also create device collection for Windows 11. Read the following guide to learn how to create Windows 11 device collections.
List of Windows 10 Versions and Build Numbers
There have been several Windows 10 versions released. Every version of Windows 10 has a unique build number, and we will utilize the build number for creating Windows 10 device collections in SCCM. The below table lists all the Windows 10 versions along with build numbers.
Windows 10 Version | Windows 10 Build Number |
---|---|
Windows 10 Version 22H2 | 19045 |
Windows 10 Version 21H2 | 19044 |
Windows 10 Version 21H1 | 19043 |
Windows 10 Version 20H2 | 19042 |
Windows 10 Version 2004 | 19041 |
Windows 10 Version 1909 | 18363 |
Windows 10 Version 1903 | 18362 |
Windows 10 Version 1809 | 17763 |
Windows 10 Version 1803 | 17134 |
Windows 10 Version 1709 | 16299 |
Windows 10 Version 1703 | 15063 |
Windows 10 Version 1607 | 14393 |
Windows 10 Version 1507 | 10240 |
Create SCCM Device Collection for Windows 10 Computers
Let’s create a new SCCM device collection for Windows 10 computers. To create a device collection, select the “Device Collections” node in the SCCM console. On the Home tab of the ribbon, select Create Device Collection.
In the General window of the Create Device Collection wizard, specify the name of the collection. Specify the collection name as “Windows 10 device collection” or “All Windows 10 Computers” and select the limiting collection. Click Next.
On the Membership Rules page, click on “Add Rule” > “Query Rule.”
Specify the name for the query rule and click Edit Query Statement.
In the Query Statement Properties window, select the Criteria tab. Next, click on the star icon in the Query Statement Properties window to set criteria.
Select “Simple” as the criterion type. Choose the attribute class = Operating System, attribute = build number. Select the operator equal to and set the value to 10240, the Windows 10 OS build number. Click OK.
Note: You must enter the build number of Windows 10 version here. Use the table listed in the above section to enter the build number for Windows 10.
If you need the query, here it is.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "10240"
After you have defined membership rules, click on Next.
The device collection has been created. Wait for a few minutes, and you will see all the Windows 10 computers grouped into the device collection.
Windows 10 SCCM Queries for Device Collection
I will list the WQL queries using which you can create a device collection for Windows 10 in SCCM. If you have got a new query that works, please let me know in the comments section.
Windows 10 SCCM Query using Build Number
Use the below WQL query to create a Windows 10 device collection using the build number. Make sure you replace the build number as new versions of Windows 10 are released.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "19043"
Windows 10 22H2 SCCM Query using Build Number
Use the below query to create Windows 10 22H2 device collection in Configuration Manager.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "19045"
Windows 10 21H2 SCCM Query using Build Number
Use the below query to create Windows 10 21H2 device collection in Configuration Manager.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "19044"
Windows 10 21H1 SCCM Query using Build Number
Use the below query to create Windows 10 21H1 device collection in Configuration Manager.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "19043"
Windows 10 20H2 SCCM Query using Build Number
Use the below query to create Windows 10 20H2 device collection in Configuration Manager.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.BuildNumber = "19042"
Windows 10 SCCM Query using OS Caption
Use the below WQL query to create a Windows 10 device collection using the caption “Windows 10 Enterprise“. For Windows 10 Professional version, substitute the caption value as “Windows 10 Professional“.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Caption = "Microsoft Windows 10 Enterprise"
Windows 10 SCCM Query using OS Name
Use the below WQL query to create a Windows 10 device collection using the OS name.
select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Name like "%Microsoft Windows 10 Enterprise%"
Still Need Help?
If you need further assistance on the above article or want to discuss other technical issues, check out some of these options.