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.

Install and Update Third Party Applications with Patch My PC
Install and Update Third Party Applications with Patch My PC

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 VersionWindows 10 Build Number
Windows 10 Version 22H219045
Windows 10 Version 21H219044
Windows 10 Version 21H119043
Windows 10 Version 20H219042
Windows 10 Version 200419041
Windows 10 Version 190918363
Windows 10 Version 190318362
Windows 10 Version 180917763
Windows 10 Version 180317134
Windows 10 Version 170916299
Windows 10 Version 170315063
Windows 10 Version 160714393
Windows 10 Version 150710240
List of Windows 10 Versions and Build Numbers

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.

SCCM Device Collection for Windows 10 Computers
Create SCCM Device Collection for Windows 10 Computers

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.

SCCM Device Collection for Windows 10 Computers
Create SCCM Device Collection for Windows 10 Computers

On the Membership Rules page, click on “Add Rule” > “Query Rule.”

SCCM Device Collection for Windows 10 Computers
Create SCCM Device Collection for Windows 10 Computers

Specify the name for the query rule and click Edit Query Statement.

SCCM Device Collection for Windows 10 Computers

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.

SCCM Device Collection for Windows 10 Computers

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.

SCCM Device Collection for Windows 10 Computers

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.

SCCM Device Collection for Windows 10 Computers
Create SCCM Device Collection for Windows 10 Computers

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.

SCCM Device Collection for Windows 10 Computers
Create SCCM Device Collection for Windows 10 Computers

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.

Prajwal Desai

Prajwal Desai is a technology expert and 10 time Dual Microsoft MVP (Most Valuable Professional) with a focus on Microsoft Intune, SCCM, Windows 365, Enterprise Mobility, and Windows. He is a renowned author, speaker, & community leader, known for sharing his expertise & knowledge through his blog, YouTube, conferences, webinars etc.