Close Menu
    Facebook X (Twitter) Instagram
    Sunday, October 12
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»Active Directory»SCCM Configmgr How to Create collections based on OU that contains DEV UAT PROD etc

    SCCM Configmgr How to Create collections based on OU that contains DEV UAT PROD etc

    Eswar KonetiBy Eswar KonetiOctober 06, 2:44 pm2 Mins Read Active Directory 22,925 Views
    Share
    Facebook Twitter LinkedIn Reddit

     

    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.

    image

    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

    image

    Click on Criteria ,select start Burst icon ,click Select

    image

    select Attribute class as System Resource and Attribute  as

    image

    Click Ok ,select Operator as like and Value is your domain name/HK/LI/%PROD%

    image

    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.

    image

    You can still it customize this query as per your needs but all you need is ,how to wild card operator .

    Hope it helps!

    % Collection Collection based on PROD configmgr OU based OU based collections Query SCCM UAT Wildcard WQL
    Share. Twitter LinkedIn Email Facebook Reddit

    Related Posts

    SCCM SQL Report – Compare Installed Apps on TWO Different Computers

    July 13, 10:35 am

    Optimize Your Intune Workflow with a Powerful Browser Extension

    March 22, 10:39 am

    Migrate Microsoft 365 Updates from SCCM/MECM to Intune for Co-Managed Devices

    February 11, 9:50 pm

    3 Comments

    1. dnewland on September 9, 2021 4:31 AM

      Thanks! This worked great!

      Reply
    2. Jimbean on February 23, 2021 9:33 PM

      Is there a way to report on systems by OU, for example systems in a specific OU that contain a specific file.

      Reply
      • Eswar Koneti on February 24, 2021 12:10 AM

        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.

        Reply

    Leave a ReplyCancel reply

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

    Sign Up

    Get email notifications for new posts.

    Author

    I’m Eswar Koneti ,a tech enthusiast, security advocate, and your guide to Microsoft Intune and Modern Device Management. My goal? To turn complex tech into actionable insights for a streamlined management experience. Let’s navigate this journey together!

    Support

    Awards

    Archives

    © Copyright 2009-2025 Eswar Koneti, All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.