Creating and managing collections in SCCM is a basic and daily task. Over the years, we’ve seen too much infrastructure with a lack of collection maintenance. It can become a burden when you have hundred or thousand of them and never cleaned 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 collection master.
The SCCM product group has understand that and released many improvements and features in their latest release to ease collection management.
We’ve compiled the latest management changes and tools available related to collections.
This blog post is also available in a video format
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 feature in details and see how they can help:
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.
To use this feature, from Device Collection, you can add the Last Evaluation field or use the new Monitoring / Collection Evaluation section.
From a management perspective, this feature is important to identify and fix all collections that are taking a long time to evaluate. To fix them review their rules and try to keep them as simple as possible. Also, review their 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).
You can now view dependency relationships between collections in a graphical format. It shows limiting, include, and exclude 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 management perspective, try not to have multiple level between collection. We’ve seen site with hundreds of links between collection and it’s a pain to manage. Hopefully this graphical tools 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 analyze data from your site and help you understand your environment and take action based on the insight.
With new SCCM version, 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 provide 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 provide 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 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.
Cleanup Unused Collections
We suggest routinely clean unused 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 PowerShell 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 devices collections names, folder and properties
- List a count of members, deployments, variables, rules and maintenance windows assign to a collection
- Find all incremental collections
- List resource extensive collections
- List all collections with a defined members count
- List collection by evaluation time
- Powerful Search to quickly find any collection
This report can be downloaded on our store.
Create 101 Operational Collections
This collection script will create a set of 101 SCCM collections for your various needs.
Downloaded more than 50 000 times and used by multiple organisation, These collections can be used for your daily operational tasks.
Download the PowerShell on my Github page.
Create Collection based on AD
Many organizations still use Active Directory groups or Organisational Unit 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 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 to learn the different method for SCCM Collections Management Tips. Use the comment section if you have more methods or script to share.
Founder of System Center Dudes. Based in Montreal, Canada, Senior Microsoft SCCM Consultant, 5 times Enterprise Mobility MVP. Working in the industry since 1999. His specialization is designing, deploying and configuring SCCM, mass deployment of Windows operating systems, Office 365 and Intunes deployments.