Creating and managing collections in SCCM is a basic and daily task. Over the years, we’ve seen too much SCCM infrastructure with a lack of collection maintenance. It can become a burden when you have a hundred or thousand of them and never clean them up. In this blog post, we’ll give you SCCM Collections Management Tips along with useful scripts and tools to help you become a SCCM collection master.
The SCCM product group has understood that and released many improvements and features in their latest release to ease collection management. We’ve compiled the latest SCCM collection management changes and tools.
This blog post is also available in a video format on our YouTube channel.
SCCM Collections Management Tips
SCCM 2010 Collection Features
SCCM 2010 (November 2020) has introduced 3 new important features for collections management:
- Collection Evaluation Viewer in the console
- Collection Query Statement Preview
- Collection Relationship
Let’s check those features in detail and see how they can help for SCCM collection management:
Collection Evaluation Viewer
Collection Evaluation Viewer is integrated with the SCCM console. No need to run the CEViewer.exe tool from the Configuration Manager Tools any more.
To use this feature, from Device Collection, you can add the Last Evaluation field or use the new Monitoring / Collection Evaluation section.
From a collection management perspective, this feature is important to identify and fix all collections that are taking a long time to evaluate. To fix these collections review their rules and try to keep them as simple as possible. Also, review their collection refresh schedule. We’ll show you an easy way to do that in this blog post.
Collection Query Statement Preview
You can now preview the query results when you create or edit a query for collection membership. When you select Edit Query Statement, select the green triangle on the query properties for the collection to show the Query Results Preview.
This is helpful to validate any collections membership changes prior to saving them. A bad query rule can have a bad effect on collection evaluation (see previous point).
SCCM Collection Relationship
You can now view dependency relationships between collections in a graphical format. It shows limiting, including, and excluding relationships. This can be helpful to understand the impact of a deployment.
To use this feature, right-click a collection and select View Relationships
As a collection management perspective, try not to have multiple levels between collections. We’ve seen sites with hundreds of links between collections and it’s a pain to manage. Hopefully, this graphical tool helps a lot.
SCCM Collections Management Tips – Management Insight
Starting with SCCM 1802, a new SCCM feature provides information about the current state of your environment. SCCM Management Insights analyzes data from your site and helps you understand your environment and take action based on the insight.
With this new SCCM version and later, new management Insight for the collection was made available. Here’s the list and their recommended actions :
- Empty Collections: Collections in your environment that have no members – You can use our script provided later to get rid of these.
- Collections with no query rules and no direct members: To simplify the list of collections in your hierarchy, delete these collections. – You can use our script provided later to get rid of these.
- Collections with the same re-evaluation start time: These collections have the same re-evaluation time as other collections. It’s recommended to modify the time so they don’t conflict.
- Collections with query time over 5 minutes: Review the query rules for these collections.
- Collections with no query rules and incremental updates enabled: Review or delete if possible
- Collections with no query rules and enabled for any schedule: Review or delete if possible
- Collections with no query rules and schedule full evaluation selected: Review or delete if possible
To use the collection management Insight :
- Go to Administration \ Management Insights \ All Insights
- Select Collections, right-click and select Show Insight
- In the next pane, you can review all recommended actions
Improvements to SCCM collection evaluation
Starting with SCCM 1810, there was an important change to collection evaluation which can improve site performance:
- Previously, when you configured a schedule on a query-based collection, the site would continue to evaluate the query whether or not you enabled the collection set to Schedule a full update on this collection. To fully disable the schedule, you had to change the schedule to None. Now the site clears the schedule when you disable this setting. To specify a schedule for collection evaluation, enable the option to Schedule a full update on this collection
This change has been covered in detail by Adam Gross on our blog and also provides a script to remove recurring schedules from device collections. If you’re running an outdated site, this is a great tool.
SCCM Collection cleanup Script
We suggest routinely cleaning unused SCCM collections. We often see lots of these “orphan” collections after years of management. The less collection, the less evaluation task for your server. You can manually delete those or use a script to automate this process.
We built a Powershell script that detects and deletes SCCM Devices Collections that have no members and no deployment assigned to them.
- The script will detect collections that have no members and no deployment assigned to it
- The script will prompt the user for a confirmation before each deletion
- The script will not delete collections that have a custom security scope
Download the SCCM Collection cleanup Script
The script can be downloaded by visiting my GitHub page.
SCCM Collection Report
To ease your management task related to your collection, we’ve also created an SCCM report to :
- List all users and device collections names, folder, and properties
- List a count of members, deployments, variables, rules and maintenance windows assigned to a collection
- Find all incremental collections
- List resource extensive collections
- List all collections with a defined member count
- List collection by evaluation time
- Powerful Search to quickly find any collection
This report can be downloaded on our store.
Create 148 SCCM Operational Collections
This collection script will create a set of 148 SCCM collections for your various needs.
Downloaded more than 60,000 times and used by multiple organizations, These collections can be used for your daily operational tasks.
Download the PowerShell on my GitHub page.
Create a SCCM Collection based on AD
Many organizations still use Active Directory groups or Organisational Units to do operational tasks in SCCM. Sometimes, they use OU to classify their devices or users.
The script will :
- List all Organisational Unit (OU)
- Prompt the Administrator to select the topmost OU where they want to start creating
- Prompt the Administrator for a folder name
- The script will create the folder in SCCM
- The script will create 1 collection per OU from the start OU and will create 1 collection for all OU under the start OU. See the example below if it’s unclear.
- The script will move the collection in the specified folder
See it in action :
And the Result in SCCM :
Download the PowerShell on my GitHub page.
Read the complete blog post if you need to know more about this script.
I hope this blog post was helpful in learning the different methods for SCCM Collections Management Tips. Use the comment section if you have more methods or scripts to share.