SharePoint Recycle Bin: What you need to know

In this SharePoint Training video, we’ll tell you everything you need to know about the recycle bins in SharePoint. We’ll discuss the first and second-stage recycle bins, the deleted site recycle bin (in the SharePoint Admin center), and we’ll also show you how to delete or restore sites and files using PnP PowerShell.

Resources

Install PnP PowerShell:

Install-Module -Name "PnP.PowerShell" -RequiredVersion 1.12.0 -Force

info Note: there is a newer PnP Version – 2.1.1

Import PnP PowerShell:

Import-Module PnP.PowerShell

Connect to SharePoint:

Connect-PnPOnline -url https://tenant-admin.sharepoint.com -Interactive

Clear Recycle Bin:

Clear-PnPRecycleBinItem -All -Force

Restore all items in the Recycle Bin:

Get-PnPRecycleBinItem -RowLimit 10000 | Restore-PnPRecycleBinItem -Force

View deleted sites:

Get-PnPTenantRecycleBinItem

Restore deleted site:

Restore-PnPTenantRecycleBinItem -url https://... -Force

Permanently delete a site (From the Recycle Bin):

Remove-PnPTenantSite -url https://... -FromRecycleBin -Force

Permanently delete a site (Skip the Recycle Bin):

Remove-PnPTenantSite -url https://... -SkipRecycleBin -Force

John Gleave

John Gleave has been a researcher, content writer, and senior editor at Business Tech Planet since 2022. John was formerly a data analyst and web designer with expertise in several programming languages, such as JavaScript, JQuery, PHP, CSS, SQL, and more! With a passion for writing and technology, he has now focused his skills on crafting tech guides for BTP. You can connect with John on LinkedIn.

Recent Posts