Can't delete site collection after trying to deploy site via PnP Site Provisioning
-
24-01-2021 - |
Question
I'm learning PnP PowerShell to provision a Site and I just made the mistake of deleting the Root Web on a site collection (did this manually). Now I can't access anything on that Site Collection and I can't delete it from the SharePoint Admin Center in Office 365.
It's just a test Site Collection. How can I delete the site collection, or restore the Root Web so I can access the Site Settings page?
Thanks!
EDIT_______________ While this used to be a big deal, apparently Microsoft fixed this on SharePoint Online. The deletion of the RootWeb on my Site Collection deleted the entire Site Collection. It is no longer visible on SharePoint Admin and taking up any resources.
Solution
If you wrongly deleted that root site, then it will be in the first level recycle bin so you can restore the site using SharePoint Online Management Shell using the following command
- Connect-SPOService -Url https://tenant-admin.sharepoint.com
- Get-SPODeletedSite
- Restore-SPODeletedSite -Identity (if you found your sites on step 2)
or else you can access the following URL format to reach the site pages library, there you can create a new site and make it as a Home page of root site https://tenant.sharepoint.com/SitePages/Forms/ByAuthor.aspx
Correct me if i am wrong to your requirement