Close Menu
    Facebook X (Twitter) Instagram
    Sunday, October 12
    X (Twitter) LinkedIn Reddit RSS
    All about Endpoint Management
    • Home
    All about Endpoint Management
    Home»CM2012»SCCM Configmgr WQL Query to get Clients from Multiple collections Coll Name Starts with ABC ?

    SCCM Configmgr WQL Query to get Clients from Multiple collections Coll Name Starts with ABC ?

    Eswar KonetiBy Eswar KonetiMarch 03, 11:00 pm1 Min Read CM2012 5,760 Views
    Share
    Facebook Twitter LinkedIn Reddit

     

     

    One of my Blog reader has posted a comment asking for ‘How to create Collection to pop-up clients from multiple Collections start with ABC% ‘ ? ABC is the Collection Name starts with.

    If you want to create a collection to see all clients from different Collections and the Collection Name starts with ABC .How do you get this done ?

    For this requirement, You Cannot use Include collection as this is not Dynamic .If you choose to go with Include collection (which is Static) ,you cannot get the clients from collections that will be created in the Future.

    To get this task done, we will using concept called sub Selected Queries with IN condition.

    Create a New Collection ,Limit the Collection to All systems, Add a Query Rule ,Edit the Query Statement and paste the following WQL into it.

    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.ResourceId in (
    SELECT ResourceID from SMS_COLLECTION CO inner join SMS_FullCollectionMembership FCM
    on FCM.COLLECTIONID=CO.COLLECTIONID and CO.Name like 'ABC%')

    Where ABC is Name of the Collection that Start with ,for Ex: SU or Microsoft or Adobe etc.

    image

    CB Collection Name Starts with Collection query Collection with Subselected Query configmgr Multiple Collection Name starts with Query SCCM Subselected 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

    2 Comments

    1. jgaard on March 16, 2021 9:29 PM

      old post, but a good one! Is it possible to show the collection names found, in the query results.

      Reply
      • Eswar Koneti on March 27, 2021 2:44 AM

        Hi,
        you can make use of SQL to query the data.
        What is your requirement, so i can help you how to fetch the data.

        Thanks,
        Eswar

        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.