How to Create SCCM Dynamic Collection – Part 2

3
SCCM Dynamic Collection

Most of the organizations are using Dynamic collections to deploy applications. If you ask me whether dynamic collections are best for your SCCM environment, my answer would be no. I would rather avoid creating SCCM dynamic collection and use Active Directory group.

 SCCM Education Posts

Content

Introduction
How to Organize Collections?
Video Tutorial – How to SCCM Dynamic Collection?
How to Create Collection Folders and Move Collections
How to Move Collections to Folders?
How to Create SCCM Dynamic Collection and Dynamic WQL Query?

Introduction

I would recommend reading this post to know more about the basics of collections, best practices, and how to create static collections. In this post, we will go through how to create dynamic collections, how to organize collections and some best practices. Also, I have uploaded a video tutorial with an audio explanation to explain all those points.

How to Organize Collections?

Why do you need to organise collections? 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 (update:- more details in Microsoft blog post). With this kind of practice, you will end up with many collections, and you need to organize collections to manage better.

You can create collection folders to organize collections to tidy up SCCM environment. You can have folders and subfolders to have better management of collections. I don’t think creating loads of folders will impact the performance of your environment. You can create Collection folders based on deployments. One example is given below:-

Applications

OD Deployment

Patch Deployment

Video Tutorial – How to SCCM Dynamic Collection?

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

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?

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

  1. Select the collections which you want to move
  2. Right Click on those selected collections
  3. Select the Move button on right click menu
  4. Select the Folder from “Move Selected Items” windows
  5. Click OK to complete the move of the collections to a particular folder

SCCM Dynamic Collection

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. In the following sections, I will teach how to create an SCCM dynamic Collection. You can use the same method to create SCCM dynamic Device collection and dynamic User collection.

  1. Navigate to SCCM console –  Assets and Compliance – User Collections
  2. Right-click and select “Create User Collection” from User Collections node
  3. 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.
  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.
  5. On the Membership Rules page of the Create User Collection Wizard, in the Add Rule list, select Query Rule.
  6. On the Query Rule Properties windows, specify the following information: 7-16 steps.SCCM Dynamic Collection
  7. Name: Specify a unique name (my query name = User Name Starts with Anoop).
  8. 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 Dynamic User Collection in SCCM.
  9. Click Edit Query Statement to Opens the Query Statement Properties dialog box where you can create a query to use as the rule for the SCCM dynamic collection.
  10. On Query Statement Properties click on Criteria tab.
  11. On Criteria Properties dialog box Criteria value as Simple Value.
  12. On Criteria Properties dialog box click on Select button to open Attribute Dialog box.
  13.  On Attribute Dialog box Select Attribute class as User Resource, Alias as = No Alias, and Attribute as Name. Click OK to close Select Attribute Dialog box.
  14. On Criteria Properties dialog box select Operator “is like“. Is Like is not the operator which gives you best performance.
  15. On Criteria Properties dialog box specify Value as “Anoop%” to create a dynamic user collection with user names starting with Anoop.
  16. Click OK OK OK to to close all dialog boxes.
  17. On Membership Rule page click on NEXT.
  18. Click NEXT NEXT and Close to finish Create User Collection Wizard.

Best Practices – Dynamic Collections

  • Try to avoid wildcard (%) in WQL Queries used in dynamic collections wherever possible
  • 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 post in resources section
  • Check and evaluate your collections with Collection Evaluation Viewer tool  https://www.anoopcnair.com/collection-evaluation-viewer

Resources:-

  • Introduction to collections in SCCM – here
  • Create SCCM Static Collections (Programmatically or using script) – here
  • Best Practices of Collection by Roger – here

3 COMMENTS

  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?

LEAVE A REPLY

Please enter your comment!
Please enter your name here

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