To permanently delete a sharepoint site, you need to use powershell. In my case, I had two site colections which I’ve created, but even if I removed them from sharepoint admin center, it moves to reclye bin, but until expiration of this service, I just have 4 days, so ast to remove permanenlty sharepoint site, I have to use sharepoint site with no wait. If you go to sharepoint admin center, then remove a site, it moves to recyle bin with 30days.
It needs to install SharePoint Online Management Shell, then needs to connect online sharepoint using powershell, later I’ll remove shrepoint site with no-wait option.
# Set password to encrypted value as specific txt file
Read-Host -Prompt “Enter password to be encrypted in mypassword.txt” -AsSecureString | ConvertFrom-SecureString | out-file “D:\O365securestring_test.txt”
# Get value from encrypted value from txt file
$password = cat “D:\O365securestring_test.txt” | ConvertTo-SecureString
$upn = “my upn address”
$mycred = new-object -typename System.Management.Automation.PSCredential -argumentlist $upn,$password
# Import SharePoint Module
Import-Module “C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell”
#Connect to SharePoint Online
Connect-SPOService -URL “https://cloudwide1602-admin.sharepoint.com” -Credential $O365Cred
then it pops up Microsoft SharePoint Online Management Shell page, then I added my upn and password, the reason why that pop-up as authentication is , I’m not using “SharePoint Online management shell”, so it pop-up
It needs to check with current site collection using “Get-SPOSite“, and if you use “Get-SPODeletedSite” cmdlet, it returns “Returns all deleted site collections from the Reclye Bin“, I have to remove this site collection from recyle-bin, how can I do it? In this case , I can use Remove-SPODeletedSite which can do function as “Remove a SharePoint Online deleted site collection from the Recycle Bin“, ex) Remove-SPODeletedSite -Identity https://cloudwide1602.sharepoint.com/sites/Teamsite , If I do exectue that command, then I try Get-SPODeletedSite to verify the site which I want to delete is existed or not, there is no site from Recyle bin.
Or, If you want to permanently delete a sharepoint site collection, you need to use Remove-SPOSite -Identity “Site Collection to delete” -NoWait Start-Sleep -s 20 [Pause script for 20 seconds before proceeding] Remove-SPODeletedSite -Identity “Site Collection to delete”
In the Remove-SPOSite cmdlet have a NoWiat Parameter, it directs “specifies to continue executing script immediately”