How to Create Windows 11 22H2 Collection in SCCM | ConfigMgr

Create Windows 11 22H2 Collection in SCCM | ConfigMgr

A query is a specified set of instructions for retrieving data from the SCCM database, and in this article, we’ll explore how to create a Windows 11 22H2 collection using a query written in the WQL language.

An SCCM hierarchy allows you to construct and execute searches to locate objects that meet your requirements. This category includes things like computer kinds and user communities. Using queries, you may retrieve information about a wide variety of items in Configuration Manager.

What is the Query Rule

Modify a collection’s membership on the fly based on the results of a scheduled query. In Active Directory Domain Services, you can, for instance, compile a list of users who are also part of the Human Resources department. When members of the Human Resources department are added to or removed from the system, the corresponding changes are reflected here immediately.

What is WQL Query?

Small semantic adjustments were made to the standard ANSI Structured Query Language (SQL) to create the WMI Query Language (WQL), which is used to query WMI.

Seeing as how WQL is a subset of SQL, whatever you can do in WQL can also be done in SQL. The only discernible differences from the user’s perspective are the keywords. Both SQL and WQL support views, therefore this isn’t a feature exclusive to either language. Collections in Configuration Manager are an excellent illustration because they are built on WQL queries.

The power of WQL is in its ability to return WMI objects and their associated properties.
Because management apps like the Configuration Manager console interact with WMI objects, you can use the results of WQL queries within the ConfigMgr infrastructure.

How to Create SCCM Device Collection

In the SCCM console, click the “Device Collections” node to begin adding devices to a collection. Choose “Create Device Collection” from the Home tab of the ribbon.

The create device collection wizard’s General window is where you’ll enter the collection’s name and choose the collection that will act as a boundary. Proceed with the next step by clicking.

Simply choose Query Rule from the Add Rule drop-down menu.

Enter a Name for the query rule, then click Edit Query Statement.

Select the Show Query language option on the Query statement properties window.

Followed by clicking OK, copy the following query, and paste it into your search bar.

select SMS_R_System.Name 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 = "22621"

Carry on through the rest of the wizard to finish setting up the Device Collection.

Conclusion on Creating Windows 11 22H2 Collection in SCCM | ConfigMgr

You have learned how to create a Windows 11 22H2 collection using a query written in the WQL language. Hope it was helpful.

Scroll to Top