In this article, I will show you how to find empty collections in SCCM (ConfigMgr) and delete them from the console. You can easily determine empty device collections and user collections using management insights in Configuration Manager.
A company recently asked me to help them resolve problems with their current Configuration Manager setup. During my audit of the SCCM server, I noticed that there were plenty of empty collections that didn’t have any users or devices in them. The admins who created these collections no longer worked for that organisation.
This scenario is common in most organizations, and I believe a delicate balance must be struck to have the proper number of device collections in SCCM. You would rather not have too few collections so that you can’t organise your clients logically, but you also don’t want to have too many so that your database is clogged with entries you’ll never use.
Ways to determine empty collections in ConfigMgr
There are two ways to find empty collections in SCCM: using Management Insights and PowerShell script. The PowerShell script was an older method to determine empty collections, and it was used when there were no management insights introduced in SCCM. Among the two, the easiest way to check for the empty collections is by using Management Insights Rules.
Configuration Manager includes a dedicated management insights rule called “Empty Collections“. The rule evaluates and lists the collections in your environment that have no members. Once you have determined the empty collections, you can delete these collections to simplify the list of collections displayed when deploying objects.
Steps to find Empty Collections in SCCM (ConfigMgr)
Let’s look at the steps to find the empty collections (user and device collections) in SCCM (ConfigMgr):
- Launch the Configuration Manager console.
- Navigate to Administration\Overview\Management Insights\All Insights.
- From the list of insights groups, expand Collections.
- Right-click Empty Collections rule and select Evaluate to find empty collections.
The Empty Collections management insights rule evaluates and lists all the empty collections present in SCCM. Empty collections rule will evaluate both user collections and device collections to list the empty ones.
After management insights rule “empty collections” is evaluated, you must review the Progress column that shows the rule status as Completed or Action needed.
- Completed: This means the management insight rule has evaluated successfully, and no issues were found.
- Action Needed: This means the management insights rule has been evaluated, and you need to review the rule details to determine the issue.
In the screenshot below, we see that the “Empty Collections” insights rule shows the status as Action needed. To check the rule details, right-click the rule and select More Details.
On the Rule Details window, we see a list of empty collections in ConfigMgr. Note that these are both user and device collections that contain no members. From the properties of this insight, select Review Actions to go to the “Collections” node in the ConfigMgr console and take further actions.
Delete Empty Collection in SCCM
Once you have determined the empty collections, you can now delete them from the SCCM console using the following steps.
- Navigate to Assets and Compliance\Overview\Device Collections\Empty Collections.
- Right-click on the empty collection and select Delete.
When you delete any collection (user or device) in Configuration Manager, you’ll see a warning message, “You are about to delete the selected collections“. Click OK to confirm the deletion of Collection. That’s how you can get rid of empty collections in SCCM.