A basic one, but today I was asked a question how can I remove a SharePoint Online site collection programmatically – the answer being the ever so powerful PowerShell.
Connect to your SharePoint Online tenant with the SharePoint Online Management Shell (follow the link below to connect to SPO)
So now you’re connected to your tenant and you now want to remove the Site Collection
So first of all let’s run a Get-SPOSite | select URL this will list all SharePoint Online Site Collections
Now we have all the site collections choose your site collection, in this case I want to remove the site collection https://pddemo3.sharepoint.com/sites/dev
Once that’s completed the Site Collection will be removed and be put in the Site Collection Recycle Bin for 90 days