SCCM Query for Microsoft Server 2019

sccm logo 600x400

Last updated on February 15th, 2025 at 11:14 pm

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!


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Avatar for Andrew Armstrong

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.

3 thoughts on “SCCM Query for Microsoft Server 2019

  • Avatar for Onur
    Onur
    22 December 2020 at 17:51

    its not work for me :/

    • Avatar for A.J. Armstrong
      A.J. Armstrong
      23 December 2020 at 10:39

      I’ve just tested all of them and they all work. Are you using these for creating a SCCM collection? Are you getting any errors?

  • Avatar for Anonymous
    Anonymous
    15 October 2020 at 04:44

    Perfect thanks!

Leave a Reply

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