Forum Discussion
James_Robertson_1
Jul 09, 2021Copper Contributor
Microsoft Endpoint Configuration Manager, Device Collection Queries
Hello all, Here is the question. I am wanting to limit the query for my machines in my Domain. I have a partially working query however I am failing miserably on the exclusions. Here is what I...
Aventador06
Jul 11, 2021Copper Contributor
Hi,
If I understand your need, I'd do :
1) COL - W10 : Collection including all Windows 10 computers :
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 "%Workstation 10%"
2) COL - OU : Collection including all computers from the OU you want to exclude :
select * from SMS_R_System where SMS_R_System.SystemOUName = "FOREST/DOMAIN/LOCATION/FIRST FLOOR/SERVER ROOM"
3) Finally, create a collection that will :
Include : COL - W10
Exclude : COL - OU
Hope this helps you