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

Office 365 Deployment - Office 365 Upgrade Task Sequence

SCCM Task Sequence with GUI - How to install more then one image with a single Task Sequence

Windows 10 Setup Script - V 2.0.0.0