Skip to content
Best Method to Create SCCM Device Collection for Windows Server 2022

Best Method to Create SCCM Device Collection for Windows Server 2022

Written By Anoop C Nair
Last Updated April 8, 2022
Posted In SCCM
SHARE

Let’s quickly check the best method to create SCCM device collection for Windows Server 2022. I also cover the details about Windows server 2022 build numbers.

Microsoft released the 2107 version of Configuration Manager (a.k.a SCCM), which supports Windows server 2022. So, it’s worth creating a dynamic device collection for grouping all Windows server 2022 devices.

You will need to understand that the grouping of Windows server 2022 dynamically helps admins target software updates and applications only to those servers. It’s essential to understand the best practices you will need to follow while creating a dynamic collection.

Windows Server 2022 build numbers are important to build a dynamic device collection logic in SCCM. The patching of Window server 2022 is important from the server management perspective.

Patch My PC

SCCM or WSUS can help you with serve patching. You can read more about how to enable patching for Windows server 2022.

List of Windows Server 2022 Build Numbers

You can find the latest server operating system build numbers in the following table. This can be useful to segregate different build versions of server 2022 devices from the SCCM (a.k.a Configuration Manager) perspective.

SCCM Device Collection for Windows Server 2022 Build Numbers
SCCM Device Collection for Windows Server 2022 Build Numbers

Windows Server 2022 version number is in the year and which half of the year (H1 or H2). For example, the Windows server 2022 version released in Aug (8th Month) 2021 is Windows Server 21H2.

  • The first two (2) digits of the Windows server 2022 version are taken from the release year. In the above example (Windows Server 21H2), that is 2021?
  • The last two (2) digits of the Windows Server 2022 version are taken either from
    • The first half of the calendar year – H1
    • or the second part of the calendar year – H2.
    • In the above example – Windows Server 2022 was released in the second half of the year.
  • Special version numbers for the major.minor.build.rev of Windows 10 structure are as follows – Windows Server 👉 10.0.20348.169
    • Major = 10
    • Minor = 0
    • Build = 20348
    • Rev = 169
Windows Server
Version 
Windows Server
Build 
Number
Extended Support EndDate of
Availability
Windows Server 2022 – 21H210.0.20348.16914th Oct 203118th Aug 2021
Windows Server, version – 20H210.0.19042.50820th Oct 2020
List of Windows Server 2022 Build Numbers

Best Method to Build SCCM Device Collection for Windows Server 2022

Let’s have a look at the best options to create the SCCM device collection for Server 2022. There are several ways to query all devices in your SCCM environment and select only Windows Server 2022.

I think you will need to settle down with the optimized WQL query to build a collection for All Window Server 2022 Devices.

SCCM Device Collection for Windows Server 2022 Build Numbers
SCCM Device Collection for Windows Server 2022 Build Numbers

You can analyze the performance of the queries using different options in SMS_G_System_OPERATING_SYSTEM properties. The following is the list of options you have to build All Windows server device collections in SCCM.

I think you will need to use Build Number or Caption properties to group all Windows Server devices.

  • Build Number -> Example for Windows server 2022 build version -> 20348
  • Caption -> Example for Caption -> Microsoft Windows Server Operating System 21H2 (need to confirm?)
  • Version -> Example for Full version number -> 10.0.20348.169

The Windows Server full version number property would be helpful to create an SCCM device collection of Windows Servers with a particular update or hotfix installed.

I would avoid using the Name property because you might need to use the % symbol to filter things, which is not good for the performance of the WQL collection query.

NOTE! – Noticed that the build numbers and version numbers of the Windows 11 operating system are also similar to that of Server 2022. So, it’s better to add some additional checks into WQL queries.

Windows Server 2022 Dynamic Device Collection based on Build Number

Let’s create Windows Server 2022 Dynamic Device Collection based on Build Number. You can also add additional conditions into the WQL query, but you also should not that this will impact the performance of the dynamic collections.

Let’s go ahead and create SCCM Device Collection for Windows Server 2022.

  • Navigate to the SCCM console – Assets and Compliance – Device Collections to create a Windows Server collection.
  • Right-click and select “Create Device Collection” from the Device Collections node.
  • From the General page, provide a Name and a Comment (optional).
  • You can be limiting the collection; choose to Browse to select a limiting collection. The collection contains members from the limiting collection
    • -> Avoid using the All Systems collection as a limiting collection.
  • Click on the Next button.

Now, it’s time to click on add rules option from the membership rules page. For dynamic collection, select the Query Rule option to build a WQL query to group all Windows Server 2022 devices available in SCCM.

You can also get more details about the best WQL query creation details from the queries node in the Monitoring workplace with the console.

Windows Server 2022 Dynamic Device Collection based on Build Number
Windows Server 2022 Dynamic Device Collection based on Build Number

You can configure multiple rules for each collection if there is a requirement. This is not required for creating All Windows Server 2022 device collections.

Enter the name of the Dynamic query – All Windows Server 2022 Devices. Click on Edit Query Statement to add All Windows Server 2022 devices.

  • Click on the Criteria tab and then the Show query Language button.
  • Copy the following query and click OK to save.
  • You can click on Green Video like the button to evaluate the WQL query using the SCCM collection query preview tool. This helps to confirm whether the WQL query is adding the correct devices to the collection or not.
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 = "20348"
SCCM Device Collection for Windows Server 2022 Build Numbers
SCCM Device Collection for Windows Server 2022 Build Numbers

NOTE! – You can also use SMS_G_System_OPERATING_SYSTEM.Version = “10.0.20348” as well to create server 2022 dynamic device collections. The choice is yours.

I recommend testing both in your environment and selecting the one best suited for your deployment methods.

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.Version = "10.0.20348"

You can use the caption property (SMS_G_System_OPERATING_SYSTEM.Caption) as another option to build the All Windows Server 2022 Device collection. But, you need to be careful whether you need to include only the server 2022 version of Windows.

Schedule All Windows Server 2022 Device Collection Update

You can now configure the regular update options for Windows Server 2022 device collection. You will need to be careful about the automatic update. You should not have any aggressive update schedule.

The regular automatic update of the collection with new Windows server devices is achieved through Schedule options.

By default, the schedule is 7 seven days. However, in the real-world probably, you might need to change the schedule to get better results.

You can click on the Schedule button to change the schedule and select the custom interval – Recur every – 1 – day. Click on the OK button to continue.

NOTE! – I don’t think there is any requirement to change the full schedule update from 7 days to 1 day if you already enabled incremental updates for server device collection.

  • Enable the following option – Use Incremental updates for this collection.
  • Keep the default value – Schedule a full update on this collectiononce every 7 days (for my lab).
  • Click on the Next, Next, Close button to finish the creation of All Windows Server 2022 Devices.
le All Windows Server 2022 Device Collection Update
All Windows Server 2022 Device Collection Update – Create SCCM Device Collection for Windows Server 2022

Author

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion · 4 comments

  1. 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 like “%Server 2022%”

  2. Thanks for the helpful info. FYI the build number in your table and first query is listed as 200348 vs 20348.

  3. to use Full OS Build

    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
    join
    sms_combineddeviceresources comb
    on
    comb.resourceid = sms_r_system.resourceid
    where
    comb.DeviceOSBuild ‘10.0.19045.4170’

Join the discussion

Your email address will not be published. Required fields are marked *

Related guides

Intune

Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws

Key Takeaways Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws! In the July 2026 Patch, Microsoft introduced new features designed to improve the overall Windows experience. The update adds enhancements to Windows Update for more flexible update management and introduces Point-in-Time Restore, providing an additional recovery option for […]

AC Anoop C Nair 9 min read
Intune

2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws

Key Takeaways 2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws! The June 2026 Windows 11 Patch Tuesday update brings several improvements to File Explorer. It adds support for additional archive formats, including UU, CPIO, XAR, and NuGet Packages (NUPKG). The update also preserves View and Sort preferences in […]

AC Anoop C Nair 10 min read
Intune

2026 May KB5089549 KB5087420 Windows 11 Patch | 0 Zero Day Vulnerabilities and 120 Flaws

Key Takeaways The Windows 11 May 2026 Patch KB5089549 KB5087420 Update brings important security fixes, performance improvements, and reliability enhancements across the operating system. The update introduces new features such as Xbox Mode for gaming, File Explorer improvements, enhanced input and sharing experiences, better taskbar and Windows Hello reliability, and additional enterprise management capabilities for […]

AC Anoop C Nair 8 min read
SCCM

ConfigMgr 2603 Introduces New Early Update Enrollment Process

Key Takeaways In this post we are discussing the ConfigMgr 2603 Introduces New Early Update Enrollment Process. Microsoft has officially released Configuration Manager version 2603 to the Early Update Ring, giving organizations an opportunity to test upcoming improvements before the global production rollout. The release is targeted at enterprises running ConfigMgr version 2409 or later […]

AC Anoop C Nair 3 min read