SCCM Collection Queries

Below are a list of Queries for different kinds of collections. Its a long list. So please only copy and paste the Query which has relevance to the task you are doing. TRY AT YOUR OWN RISK. Not that there are any Risks. But I just wanted it to be clear before you go ahead and curse me for something I have not asked you to do.

Active Directory Collection based on OU:
Replace with your own Domain/OU Path
select * from SMS_R_System where LOWER(SMS_R_System.SystemOUName) = ""

Collection based on Domain membership:
Replace “domain” with your own NetBios name of your Domain e.g. zmemon
select * from SMS_R_System where SMS_R_System.ResourceDomainORWorkgroup = “domain”

All Windows 10 Devices:
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 where SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation 10.0%"

All clients require a Reboot:

selectSMS_R_SYSTEM.ResourceID, SMS_R_SYSTEM.ResourceType, SMS_R_SYSTEM.Name, SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup, SMS_R_SYSTEM.Client fromsms_r_system ASsms_r_systeminnerjoinSMS_UpdateComplianceStatus asc onc.machineid=sms_r_system.resourceidwherec.LastEnforcementMessageID = 9

Add a Comment

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

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