Working on fine tuning collections to get the clients (DEV,UAT,PROD etc) from Active Directory based on OU for reporting purpose .Reporting can be either application deployment or software update compliance or anything that you want .In my case, all the OU’s in Active Directory are created based on BU( Business Unit) and business unit most likely with country name in OU.
Lets take example of OU structure like below in my Active Directory.
With the above OU structure ,I want to create collection that list all computers from PROD/DR OU for each Business Unit (Hong kong,Singapore,India etc) . Parent OU can be DBS,CT,CX or anything under each Business Unit.
So to get all computers from PROD/DR OU for Hong Kong Business Unit ,we will use wildcard character (%) with like operator in WQL Query .
ESKONR.INTRANET.ASIA/HK/LI/INFRASERVERS/%PROD%
The above Query will list all PROD clients from OU ‘HK/LI/infraservers’
If you want to list all PROD computers from HK OU irrespective of what Child OU they are in, but should be in PROD OU ,use the following condition.
ESKONR.INTRANET.ASIA/HK/%PROD%
If you want to combine PROD and DR Clients into 1 collection ,you can use OR condition by creating 2 criteria's like below.
ESKONR.INTRANET.ASIA/HK/%PROD%
OR
ESKONR.INTRANET.ASIA/HK/%DR%
So ,How to achieve this using collection ?
Create new Device Collection ,Name the collection ,limit the collection to All Systems ,Add rule and select Query rule ,name the collection again ,select Edit Query statement
Click on Criteria ,select start Burst icon ,click Select
select Attribute class as System Resource and Attribute as
Click Ok ,select Operator as like and Value is your domain name/HK/LI/%PROD%
Click Ok ,Ok ,Ok and accept the default steps you see the screen.
Below is sample collection criteria used in my lab:
List all servers from PROD and DR OU excluding server 2003 operating system as my lab is running 1 server 2003 OS.
You can still it customize this query as per your needs but all you need is ,how to wild card operator .
Hope it helps!
3 Comments
Thanks! This worked great!
Is there a way to report on systems by OU, for example systems in a specific OU that contain a specific file.
Hi,
You looking for report for systems in specific ou? If specific file then you need to enable software inventory to match with ou details.