SCCM Query for Microsoft Server 2019

sccm logo 600x400

Last updated on March 30th, 2023 at 05:07 pm

Read Time:1 Minute, 55 Second

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]

Free Subscription

If you want to be notified when we post more quality guides like this one, sign up to our free subscription service and you will receive an email when a new post is live.

Join 441 other subscribers.

No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.


3 thoughts on “SCCM Query for Microsoft Server 2019

Leave us a message...

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