1

Trying to delete a site collection and got this error when doing so

remove-spsite: the request could not be completed because the specified solution was not found

For some reason I couldn't delete it in GUI and powershell throws out this error.

2
  • Try to run the Get-SPSite to Returns all site collections.
  • Check if your site collection is already listed or not.
  • If it's already listed.
    • Make sure, you are running the SharePoint Management Shell as Administrator.
    • Make sure, the site collection URL has been provided successfully in the following command
Remove-SPSite -Identity "http://sitename" -GradualDelete -Confirm:$False

This is will remove the given site collection and all included sites by using GradualDelete; confirmation has been suppressed.

If the issue still exists, try to repair your Content Database as the following.

$db = Get-SPContentDatabase "Content_DB_Name";
$db.Repair($false);
$db.Update();

Note:
If there is no issue the output should be <OrphanedObjects Count="0" /> If the count not equal to 0, then set the parameter to

$db.repair($true)

Use $true if you want it to actually repair the database. $false will just list what it would repair.

  • thanks for that. does running db.repair takes the db offline? I have other sites that use the same content db and I want to know if it will have any effect on them? – dkorra Feb 27 '17 at 15:32
  • Furst tell me is the site collection is listed , regarding your question just run$db = Get-SPContentDatabase "Content_DB_Name"; then $db.Repair($false) this not takes the db offline, if the result was <OrphanedObjects Count="0" /> so there is no issue in DB and no need to run $db.Repair($true) $db.Update(); and the issue is related to anything else and try to check the log. – Mohamed El-Qassas MVP Feb 27 '17 at 19:46
  • Thank you. I run $db.Repair($false) and the result was <OrphanedObjects Count="1"/>. So if I run db.repair($true) will it have any effect on the database or any of my other site collections in the mean time? – dkorra Feb 28 '17 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.