SCCM Device Collections for Windows Server 2022 2019 2016

Prajwal Desai
Posted by Prajwal Desai
SCCM Device Collections for Windows Server

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
Share This Article
Prajwal Desai
Posted by Prajwal Desai
Follow:
Prajwal Desai is a Microsoft MVP in Intune and SCCM. He writes articles on SCCM, Intune, Windows 365, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.
5 Comments