SharePoint 404 Error Site Collection Corrupted (Error 0x80070003) How to Delete
Previously we took a look at a possible cause of a 404 error in SharePoint after a content database restoration. This time we have determined that the site collection is corrupt, and we don’t have any backups (you should always have backups). Another scenario is that we just want to get rid of the site collection, but for whatever reason, you cannot remove the site collection.
Attempting to Remove a Site Collection using Remove-SPSite and Remove-SPDeletedSite
First, we get the site name and id into a variable
$site = Get-SPSite http://domainname.com/sites/sitecollectionname
$siteguid = $site.id