SCCM Query for Microsoft Server 2019

sccm logo 600x400
System Center Logo

Estimated reading time: 2 minutes

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!

Click to rate this post!
[Total: 0 Average: 0]

Share this content:

Avatar for Andrew Armstrong

About Andrew Armstrong

Founder of TechyGeeksHome and Head Editor for over 15 years! IT expert in multiple areas for over 26 years. Sharing experience and knowledge whenever possible! Making IT Happen.

View all posts by Andrew Armstrong

3 Comments on “SCCM Query for Microsoft Server 2019”

Leave a Reply

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