Queries - Computers In 1 or more Active Directory OUs

The following Query can be used to create a collection of computer that are in 2 different AD OUs just replace "Food.com/Computers/Desktops" With your own domain OUs

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.SystemOUName = "Food.com/Computers/Desktops" or  
SMS_R_System.SystemOUName = "Food.com/Computers/Laptops"

Comments

Popular posts from this blog

SCCM Task Sequence GUI - How to set up the TS to work with a GUI

SCCM Applications vs. SCCM Packages: Understanding the Key Differences

How to Deploy a Windows 10 Servicing update as a Application