SCCM Device Collections for Windows Server 2022 2019 2016

In this article, I will show you how to create SCCM device collections for Windows Server. We will use WQL queries to create the device collections for all the latest versions of Windows Servers, which include 2022, 2019, and 2016.

Windows servers can be managed using Configuration Manager current branch. The only prerequisite is that the SCCM client must be installed on Windows Server before you can begin managing it. Please refer to the following guide to learn about different methods for how to install SCCM client on Windows Server 2022.

Windows Server comes in two flavors: GUI and Core. Out of the two, the Server Core option is a minimal installation option and has a smaller disk footprint. You can still install SCCM client on Windows Server 2022 core OS, but with some restrictions. Please refer to the following guide to learn how to install SCCM client on Windows Server 2022 Core.

Find Windows Server OS Version and Build Number Details

On any Windows Server, you can find the version and build number details by running the systeminfo command. Once you find the build number of Windows Server, you can use that to create the device collection in SCCM.

Login to Windows Server and launch the command prompt. Type systeminfo and press enter. From the systeminfo output, look for OS Version. For example, in the below screenshot, it’s a Windows Server 2016 and the OS version is 10.0.14393.

Find Windows Server OS Version and Build Number Details
Find Windows Server OS Version and Build Number Details

Running the systeminfo command on Windows Server 2019 reports the OS version as 10.0.17763.

SCCM Device Collection Windows Server 2016 and Server 2019

Now that you know how to find the OS version and build number details of Windows Server 2016, let’s proceed to create SCCM device collections for Windows Server.

Windows Server Versions and Build Numbers

When you create device collections for Windows Server in ConfigMgr, the WQL query uses the build number to identify the server version. Hence, you must use the correct build number in the SCCM query to create collections for Windows Server. See also Windows Server Release info.

The below table lists the Windows Server versions and build numbers. Use this information to create SCCM device collections for Windows Server.

Windows Server VersionBuild Number
Windows Server 202220348.169
Windows Server 2019 (version 1809)17763.107
Windows Server 2016 (version 1607)14393.0
Windows Server Versions and Build Numbers

Note: Windows Server is moving to the Long-Term Servicing Channel (LTSC) as our primary release channel. The Windows Server Semi-Annual Channel (SAC) was retired on August 9, 2022. There will be no future SAC releases of Windows Server.

SCCM Device Collections for Windows Server

We will now look the process of creating SCCM device collections for Windows Server. I will list the WQL query for all the latest versions of Windows Server. You can use this query and quickly create the device collections in SCCM.

Create SCCM Device Collection for Windows Sever 2022

  • In the SCCM console, right click Device Collections.
  • Click Create Device Collection.
  • Specify the name of collection and set a Limiting Collection.
  • In the next screen, click drop Add Rule. Click Query Rule.
  • Specify Query name and click Edit Query Statement.
  • Click Criteria under Query Statement Properties and then click Show Query Language.
  • Paste the below query and click OK.
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" and SMS_G_System_OPERATING_SYSTEM.Caption = "Microsoft Windows Server 2022 Datacenter"

Create SCCM Device Collection for Windows Sever 2019

  • In the SCCM console, right click Device Collections and select Create Device Collection.
  • Specify the name of collection and set a Limiting Collection.
  • In the next screen, click drop-down and select Add Rule. Click Query Rule.
  • Specify Query name and click Edit Query Statement.
  • Click Criteria under Query Statement Properties and then click Show Query Language.
  • Paste the below query and click OK.
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.17763" and SMS_G_System_OPERATING_SYSTEM.Caption = "Microsoft Windows Server 2019 Datacenter"
SCCM Device Collection Windows Server 2016 and Server 2019

Create SCCM Device Collection for Windows Sever 2016

  • In the SCCM console, right click Device Collections.
  • Click Create Device Collection.
  • Specify the name of collection and set a Limiting Collection.
  • In the next screen, click drop-drop and select Add Rule. Click Query Rule.
  • Specify Query name and click Edit Query Statement.
  • Click Criteria under Query Statement Properties and then click Show Query Language.
  • Paste the below query and click OK.
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.14393" and SMS_G_System_OPERATING_SYSTEM.Caption = "Microsoft Windows Server 2016 Datacenter"
SCCM Device Collection Windows Server 2016 and Server 2019

5 Comments

  1. Avatar photo Srividhya says:

    Any idea to get the approved KB number list for specific OS (like 2019)?

  2. Avatar photo madhan kumar says:

    Good morning
    Hi sir
    A big thanks For A big thought

    i have done sccm course in august 2019 but didn’t write the online exam I planned to write sccm exam so i needed you help for preparation i have some knowledge on sccm this site is very userfull for me for
    I need below notes on some topic now

    How do i start the preparation too do sccm exam need you guidness
    1. What is collection definition with example

    2,what is site, site system, site server with definition

  3. Based on the revised query, I would recommend doing Caption like “Microsoft Windows Server%” so you don’t exclude any Standard edition servers in the environment.

  4. The OS version for Server 2016 is the same as the OS version for Windows 10 1607. The query provided will create a collection with Server 2016 and Windows 10 1607. You will also need to add a criteria such as specifying “Caption like Server” or “Caption not like Windows 10” to exclude the client OS. The same is true for Server 2019 and Windows 10 1809.

    1. Thank you Doug. I have corrected the query for both Server 2016 and Server 2019.

Leave a Reply

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