SCCM Query for Microsoft Server 2019

I’ve not done a post about SCCM queries for a while now so in addition to a load I did some time ago, I thought I’d bring things up to date with a few new queries starting with Microsoft Server 2019. I’ve been using this one for creating a Windows Server 2019 collection in SCCM […]

SCCM Query For Microsoft Server

I’ve not done a post about SCCM queries for a while now so in addition to a load I did some time ago, I thought I’d bring things up to date with a few new queries starting with Microsoft Server 2019.

I’ve been using this one for creating a Windows Server 2019 collection in SCCM to deploy Microsoft Updates to it. As we use both Standard and Datacenter, it is a bit broad so you might want to tone it down a little by adding an equals Datacenter or/and Standard instead of using a wildcard like I have in this first query. I’ll add the other two queries as well though in case you do want to use them.

All Devices with Windows Server 2019 Installed

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 "Microsoft Windows Server 2019%"

All Devices with Windows Server 2019 Datacenter Installed

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 = "Microsoft Windows Server 2019 Datacenter"

All Devices with Windows Server 2019 Standard Installed

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 = "Microsoft Windows Server 2019 Standard"

I’ll be posting some more SCCM collection queries shortly which will include Server 2016.

Feedback

If this post has helped you in any way, we would love for you to take a second and leave us a message in the comments section below. It helps us to know that there are people out there taking a look at our little part of the web!

Related: Add or Remove Multiple Application Deployments in SCCM using Powershell

More Guides You Might Have Missed

🛠️

Gear We Recommend

Testing configs is easier with a dedicated admin machine set up right. Here’s the kit we use.

Browse our Windows Admin Toolkit picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases.


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Active Directory, PowerShell, and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published over 1,500 practical guides covering real-world IT problems and solutions. When not solving IT problems,

Andrew develops free Windows utilities including Ultimate Settings Panel, which has been downloaded over 850,000 times.

3 thoughts on “SCCM Query for Microsoft Server 2019

Comments are closed.