SCCM PowerShell Script to Delete Unused Collection

Benoit LecoursSCCM1 Comment

From all management activities, collections are arguably the most important object to know about. Collection evaluation, if not configured correctly can have a huge impact on your SCCM hierarchy. This Powershell script will detect and delete SCCM Devices Collections that have no members and no deployment assigned to it.

This can be useful to delete unused/unneeded collections. We often see lots of these “orphan” collection after years of management. The less collection, the less evaluation task for your server.

  • 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 which have custom security scope

In a further version, we are planning to add an easy way to exclude some collections and supporting users collections.

Download the script

The script can be downloaded by visiting my Technet Gallery page.

SCCM Script Delete Collection Preview

SCCM Script Delete Collection

Leave us a comment and let us know if this script has been helpful.

Share this Post

SCCM PowerShell Script to Delete Unused Collection
5 - 6 votes

Founder of System Center Dudes. Based in Montreal, Canada, Senior Microsoft SCCM Consultant, 4 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.

One Comment on “SCCM PowerShell Script to Delete Unused Collection”

Leave a Reply

Your email address will not be published. Required fields are marked *