kwizcom banner advertisement

SharePoint Online: Delete Site Collection from Recycle Bin

Requirement: Delete Site Collection from recycle bin in SharePoint Online

How to Delete SharePoint Online Site from recycle bin?
When we delete a SharePoint Online site collection, it goes to the Recycle Bin and stays there for 93 days. However, at times we may want to completely delete the site from recycle bin too for reasons such as:
  • We run shortage of storage quota and we want to delete the site collection to obtain the space.
  • We need to create a new site collection with the same URL of the deleted site
Permanently Delete Site Collection from Recycle bin
To delete a site permanently from recycle bin in SharePoint Online, follow these steps:
  • Login to Office 365 Admin >> SharePoint Online Admin Center
  • Click on "Sites" >> "Deleted Sites" link from left navigation
  • Select the site from the list and click on "Delete" button in the toolbar
  • Confirm the delete operation in the prompt!
    sharepoint online delete site collection from recycle bin powershell

SharePoint Online: Delete Site Collection from Recycle Bin using PowerShell
#Define Parameter values
$AdminSiteURL = "https://crescent-admin.sharepoint.com/"
$DeletedSiteCollURL = "https://crescent.sharepoint.com/sites/DeletedSite"
 
#Connect to SharePoint Online
Connect-SPOService -url $AdminSiteURL -Credential (Get-Credential)

#Remove Deleted SharePoint Online Site Collection permanently
Remove-SPODeletedSite –identity $DeletedSiteCollURL -Confirm:$false

Permanently delete All site collections from recycle bin in SharePoint Online:
#Define Parameter values
$AdminSiteURL = "https://crescent-admin.sharepoint.com/"
 
#Connect to SharePoint Online
Connect-SPOService -url $AdminSiteURL -Credential (Get-Credential)

#Permanently Remove all Deleted Sites
Get-SPODeletedSite | ForEach {
Write-host "Deleting Site " $_.Url
Remove-SPODeletedSite –Identity $_.Url –Confirm:$False
}

Here is my another post on deleting SharePoint Online site collections: How to Delete a Site Collection in SharePoint Online using PowerShell?
SharePoint Online: Delete Site Collection from Recycle Bin SharePoint Online: Delete Site Collection from Recycle Bin Reviewed by Salaudeen Rajack on December 13, 2017 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.