PowerShell script: Deleting all lists on your Site Collection

From time to
the time you’ll find yourself in a situation where you have various lists on a site
collection that is no longer relevant and can slow down your site. Deleting
lists can improve performance, but the reluctance to do it is often due to the time
required. The thought of logging on to your site and going through all the various
steps can be enough to put off the operation, with potentially negative
consequences. In this article, we’ll show you how to delete lists on your site
collection whose names are text-based.

Get file code here: DeleteListsOnSiteCollection.ps1

How does
it work?

Example: You’ve
created lists on your site collection with the same list names on various
sub-sites; they are no longer relevant and you wish to delete them.

In the main site:

In the sub-site:

Step 1: Click here to download: DeleteListsOnSiteCollection.ps1

Run DeleteListsOnSiteCollection.ps1 file with PowerShell.

Step 2:
Input your chosen parameters as pictured below and click Enter.

Step 3: The
PowerShell script will show the results while deleting the lists.

Step 4: Go to your site to check out the final
results.


SharePoint Online

The cloud parts are functional components that extend your SharePoint Online environment in Microsoft 365.

Supports Classic and Modern sites for SharePoint Online/Microsoft 365

SharePoint

Top SharePoint Online Products

Experience greater power and savings by bundling our SharePoint apps and cloud parts.


Calendar Plus


Chart Plus


Knowledge Base


Project Management Central


Simple List Search

 

On-Premises Only

These web parts extend SharePoint beyond its out-of-the-box capabilities by tailoring it to your requirements with Bamboo Solution’s growing portfolio of SharePoint Web Parts.

SharePoint 2013, 2016, 2019 – Classic Pages Only

SharePoint

Top On-Premises Only Products

Experience greater power and savings by bundling our SharePoint apps and web parts.


Calendar Plus


Data Viewer


Password Change


Password Expiration


Password Reset

 

Featured Services

SharePoint Health Check

A SharePoint Health Check will identify the causes of issues and risks associated with your specific environment, and is custom tailored to provide you with the best recommendations to optimize your SharePoint environment.

SQL Health Check

Document recommendations relating to performance, stability, availability, or a specific focus you request of your SQL Server database instances.

My SharePointXperts

The truth is that each SharePoint skill may not be a full time job for many organizations, and it is nearly impossible for one person to do everything you need – so augment your team with SharePointXperts; providing the skill sets you need when you need them!