By default, when you delete a SharePoint Online site collection from the SharePoint admin center, it is moved to the Recycle Bin, where it is retained for a 30-day period. But, what if you don’t want to wait 30 days? Or you need the quota that the site collection has or even you need to create a new SC with the same url? To all those question, PowerShell is your answer, so let’s begin:
$cred=get-credential
$siteAdminURL = “https://yourtenanturl-admin.sharepoint.com”
Import-Module Microsoft.Online.SharePoint.PowerShell
connect-sposervice -url $siteadminurl -credential $cred
Get-SPODeletedSite | foreach {
Write-host “Deleting ” $_.Url
Remove-SPODeletedSite –Identity $_.Url –Confirm:$false
}