How to Create SCCM Dynamic Collection – Part 2

Let’s check How to Create SCCM Dynamic Collection – Part 2. Most organizations are using Dynamic collections to deploy applications. If you ask me whether dynamic groups are best for your SCCM environment, my answer would be no.

I would rather avoid creating an SCCM dynamic collection and use the Active Directory group. More details about this topic are available in SCCM Query All Active Directory Security Groups Dynamic Collection.

 SCCM Education Posts

I would recommend reading the static collection post to know more about the basics of collections, best practices, and how to create static groups.

In this post, we will go through how to create dynamic collections, organize collections, and some best practices. Also, I have uploaded a video tutorial with an audio explanation to explain all those points.

Patch My PC

How to Organize Collections?

Why do you need to organize collections? First of all, many admins create two(2) unique groups for each application. One is for the installation of the application, and the other is for the uninstallation of the application.

I don’t recommend creating two (2) collections for each app deployment (update:- more details in Microsoft blog post). With this kind of practice, you will have many groups, and you need to organize collections to manage them better.

You can create folders to organize collections to tidy up the SCCM environment. You can have folders and subfolders to have better management of groups.

I don’t think creating loads of folders will impact the performance of your environment. You can generate Collection folders based on deployments. One example is given below:-

Adaptiva

Applications

OD Deployment

Patch Deployment

Video Tutorial – How to SCCM Dynamic Collection?

How to Create SCCM Dynamic Collection – Part 2 1

How to Create Collection Folders and Move Collections

To create SCCM collection folders, follow the steps:-

  1. Right-click on Device or User Collections
  2. Select Folder
  3. Enter the Folder Name “Default Collections” (as you can see in the video tutorial)
  4. Click OK button
SCCM Dynamic Collection
How to Create SCCM Dynamic Collection – Part 2 2

The points mentioned in the picture are just for pictorial representation of the steps, and it’s not the same as the steps mentioned above.

How to Move Collections to Folders?

We need to move the collections to different folders and between the folders to organize collections. How do you move the collections to folders? Follow the steps below:-

Select the collections which you want to move

Right Click on those selected collections

Select the Move button on right-click menu

Select the Folder from “Move Selected Items” windows

Click OK to complete the move of the collections to a particular folder

SCCM Dynamic Collection
How to Create SCCM Dynamic Collection – Part 2 3

How to Create SCCM Dynamic Collection and Dynamic WQL Query?

As I explained in the video tutorial, you need to use a Query rule to create a dynamic collection. I will teach how to create an SCCM dynamic Collection in the following sections.

You can use the same method to create SCCM dynamic Device collection and dynamic User collection.

Navigate to the SCCM console –  Assets and Compliance – User Collections

Right-click and select “Create User Collection” from the User Collections node

On the General page, provide a Name and a Comment. Then, in Limiting collection, choose to Browse to select a limiting collection. The collection will only contain members from the limiting collection.

How to Create SCCM Dynamic Collection - Part 2 1
How to Create SCCM Dynamic Collection – Part 2 4

On the Membership Rules page of the Create User Collection Wizard, in the Add Rule list, select the type Query Rule membership rule for this collection. You can configure multiple rules for each collection.

On the Membership Rules page of the Create User Collection Wizard, in the Add Rule list, select Query Rule.

On the Query Rule Properties windows, specify the following information: the above steps.

How to Create SCCM Dynamic Collection - Part 2 2
How to Create SCCM Dynamic Collection – Part 2 5

Building Dynamic Query

You will need to build a dynamic WQL query for the dynamic collection. Follow the steps mentioned in the video to complete the process.

Name: Specify a unique name (my query name = User Name Starts with Anoop).

Resource class: Select the type of resource you want to search for and add to the collection. You have to select User Resource to create a Dynamic User Collection in SCCM.

Click Edit Query Statement to open the Query Statement Properties dialog box, where you can create a query to use as the rule for the SCCM dynamic collection.

On Query Statement Properties, click on the Criteria tab.

On the Criteria Properties, the dialog box Criteria value is Simple Value.

The dialog box clicks on the Select button on the Criteria Properties to open the Attribute Dialog box.

 On the Attribute Dialog box, Select Attribute class as User Resource, Alias as = No Alias, and Attribute as Name. Click OK to close the Select Attribute Dialog box.

The dialog box selects Operator “is like” on the Criteria Properties.” Is Like is not the operator which gives you the best performance.

The dialog box specifies Value as “Anoop%” to create a dynamic user collection with user names starting with Anoop on the Criteria Properties.

Click OK OK OK to close all dialog boxes.

On the Membership Rule page, click on NEXT.

Click NEXT NEXT and Close to finish Create User Collection Wizard.

How to Create SCCM Dynamic Collection - Part 2 3
How to Create SCCM Dynamic Collection – Part 2 6

Best Practices – Dynamic Collections

Try to avoid wildcard (%) in WQL Queries used in dynamic collections.

Try to avoid OR conditions in WQL Queries used in dynamic collections wherever possible.

Direct Collection Rules have disadvantages as well. More details in Rogers’s post in the resources section

Check and evaluate your collections with the Collection Evaluation Viewer tool  SCCM Collection Evaluation Viewer Tool Collection Eval Issue (anoopcnair.com)

Author

Anoop is Microsoft MVP! He is a Solution Architect in enterprise client management with over 17 years of experience (calculation done in 2018). He is Blogger, Speaker, and Local User Group HTMD Community leader. His main focus is on Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc…..…

3 thoughts on “How to Create SCCM Dynamic Collection – Part 2”

  1. “First of all, many admins create two(2) unique collections for each application. One for installation of the application and the other one is for uninstallation of the application. I don’t recommend creating two (2) collections for each app deployment.”
    As the Technical support need being able to install/uninstall apps then if you don’t suggest 2 collections what are you suggesting?

    Reply

Leave a Comment

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