Best Method to Create SCCM Device Collection for Windows Server 2022

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.

Adaptiva

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

Anoop is Microsoft MVP! He is a Solution Architect in enterprise client management with more than 20 years of experience (calculation done in 2021) in IT. He is a blogger, Speaker, and Local User Group HTMD Community leader. His main focus is on Device Management technologies like SCCM 2012, Current Branch, and Intune. E writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc…

4 thoughts on “Best Method to Create SCCM Device Collection for Windows Server 2022”

  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%”

    Reply
  2. 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’

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.