Today I will talk about SharePoint Online Management Shell and show you how to use SharePoint Online Management Shell to clean up the Recycle Bin.
Let’s explain the scenario: You’ve created two Project Online environments (/PWA and /Projects) but now you decided to use only one.
- You need to remove 1 Project Online instance and there is a correct way to do this.
- You’d like to clean up the Recycle Bin. When you do this you can re-use the same name again without waiting 30 days.
So, let’s start it:
To execute the step 1:
- You will need to connect to the SharePoint Admin Center.
- Select the instance that you decided to delete and
- Remove the Project Web App.
- Delete the Site Collection
Now if you click on Recycle Bin on the Ribbon, you will see the site excluded.
OK, you deleted correctly the instance, but now you decided to re-use the same name or just clean up your Recycle Bin.
- Download the SharePoint Online Management Shell (here).
- Open it (run as Administrator).
- Use the command Connect-SPOService and insert the SharePoint Admin Center URL. (You will need to enter login and password).
- Use the command Get-SPODeletedSite to see all sites that have been deleted.
- Use the command Remove-SPODeletedSite to remove the site collection.
Now if you check the Recycle Bin again, there is no more “…/Sites/Projects”.
SharePoint Online Management Shell is a powerful tool. To see what else you can do using this tool, click here Introduction to the SharePoint Online Management Shell.
See you guys!!!