Deleting SharePoint Online Site Collections from the Recycle Bin

2016-01-22 17:23:38
Posted by aeadmin on Jan 22, 2016 9:23:38 AM

Have you deleted a site collection hoping to free up disk utilization only to find the deleted site collection lingering in the recycle bin?

Unfortunately, the recycle bin does not provide the ability to delete these site collections.

You can use client-side Windows PowerShell to delete the site collection using the following process.

1. Launch Windows PowerShell as Administrator by right clicking the Windows PowerShell icon

power-shell-icon

 

 

2. Click Run as Administrator

run-admin

3. Cut and paste the following script into the Windows PowerShell window.
$adminusername = "<SharePoint Online Admin user name>"
$adminpassword = "<SharePoint Online Admin user password>"
$siteAdminURL = "https://<tenant domain>-admin.sharepoint.com"
Import-Module Microsoft.Online.SharePoint.PowerShell –DisableNameChecking
$securePassword = ConvertTo-SecureString $adminpassword –AsPlainText –force
$O365Credential = New-Object System.Management.Automation.PsCredential($adminusername, $adminsecurePassword)
Connect-SPOService -Url $siteAdminUrl -Credential $O365Credential

Remove-SPODeletedSite -Identity <site collection URL> #ex: https://<tenant>eccuorg.sharepoint.com/sites/project1

4. Verify the site collection is deleted from the SharePoint Online recycle bin.

Written and composed by one of our Senior Microsoft SharePoint Architects, Jim Eagleton.

Tags: Technology, disk utilization, SharePoint

    Are You Secure? Score a FREE O365 Security Assessment.

    We're here to help!

    We'd love to find out more about the projects and initiatives you're working on to exchange ideas and provide some high-level guidance where we can.  We love learning from others as well as sharing some of our experience and lessons learned.  Let's talk!

    Subscribe to Email Updates

    Recent Posts

    Posts by Tag

    see all