Omar El-Anis – 365 Developer

My experiences with SharePoint, Flows, PowerApps, JavaScript and all of the other lovely web technologies out there!


Force delete site form recycle bin in SharePoint Online Admin Tenancy

If you find yourself in the situation where you have deleted a site from the admin centre but need to create a site with the same name you won’t be able to until the site is removed from the admin recycle bin, to delete the site from the recycle bin run the following script in PowerShell – remember to change the relevant fields to match your tenancy

$username = ""
$password = Read-Host "Please enter the password for $($userName)" -AsSecureString
$URL = ''
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force)
Connect-SPOService -Url -Credential $cred
Remove-SPODeletedSite -Identity $URL

0 0 vote
Article Rating
Notify of
Inline Feedbacks
View all comments