In our project, I had to delete a SiteCollection using PowerShell commands. It seems pretty simple achievable using remove site PowerShell command. SharePoint has it owns mind :-) That's how you learn SharePoint the hard way !!
Let me get back to the problem and solution then next.
I was trying to delete a site collection using the command:
Problem
- Remove-Spsite -Identity "http:
You get the error " Remove-SPSite : <nativehr>0x80070003</nativehr>"
Resolution
- Open SharePoint Central AdministrationClick on Application Management and Manage Content Databases.
- Select the Web Application in which site collection resides.
- Click on the existing Content DB.
- Select Remove Content database and click on ok.
- Click on Add Content Database.
- Add the Content Database name which you was deleted in Database Name and Click on ok.
- Content Db will be added successfully.
Now, you can delete the SiteCollection in a seamless way!!
Happy SharePointing :-)