I'm having some issues which I think are caused by some poor deployments. I'm trying to remove them but I'm running into an error.

Uninstall-SPUserSolution -Identity WspImportProject1.wsp -Site http://test.foo.com

Uninstall-SPUserSolution : Unable to access web scoped feature (Id: c0cd4001-2a59-4c05-b243-81a701533601) because it references a non-existent or broken web (Id: f5bb9b29-344b-408b-8716-4a02c384f0c2) on site 'http://test.foo.com'.  Exception: System.ArgumentException: Value does not fall within the expected range.
   at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)
   at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)
At line:1 char:25
+ Uninstall-SPUserSolution <<<<  -Identity WspImportProject1.wsp -Site http://test.foo.com
    + CategoryInfo          : InvalidData: (Microsoft.Share...allUserSolution:SPCmdletUninstallUserSolution) [Uninstall-SPUserSolution], SPFeatureIsOrphanedException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletUninstallUserSolution

When I've googled this problem, I've found a bunch of information saying that I need to restore the site first and then remove the solution, which is counter-intuitive. I also see no way to restore the site.

Does anyone know how to fix this problem? It is only growing worse as I try new solutions which also don't work, leaving my sharepoint installation cluttered with failed code.

This is for my response to Meyer Denney

Hey Meyer, Thank you for looking into my problem. I tried the commands you gave but they did not find the solution, probably because these are UserSolutions instead of Solutions.


These are the solutions that I cannot remove due to the above error:

PS C:\Users\Sam\Downloads> Get-SPUserSolution -site http://test.foo.com

Name                           SolutionId                           Status
----                           ----------                           ------
audit-demo-3.wsp               7b8a210d-058a-42be-8ad3-b5ccc2338f21 Activated
audit-demo-3-12c.wsp           2dc97848-10ac-47ea-a236-c876c18801a2 Deactivated
WspImportProject1.wsp          2dc97848-10ac-47ea-a236-c876c18801a2 Activated

These solutions are fine and I'm able to remove them through various methods:

PS C:\Users\Sam\Downloads> Get-SPSolution

Name                           SolutionId                           Deployed
----                           ----------                           --------
fooauditsystem.wsp             12ae832d-5a46-40a0-b6cc-1953d23efe50 True
auditbuttoncustomaction.wsp    7556915f-a042-4f02-903f-665594c8c5b9 True

PS C:\Users\Sam\Downloads> stsadm -o enumsolutions

<Solutions Count="2">
   <Solution Name="fooauditsystem.wsp">
      <LastOperationTime>3/16/2012 12:28 PM</LastOperationTime>
   <Solution Name="auditbuttoncustomaction.wsp">
      <LastOperationTime>3/16/2012 12:03 PM</LastOperationTime>

1 Answer 1


In SharePoint Management Shell, try removing them with the following commands:

stsadm –o retractsolution –name MySharePointSolutionPackage.wsp –url http://webapplication –immediate

stsadm –o deletesolution –name MySharePointSolutionPackage.wsp
  • Hey Meyer thank you for your help. Please see my edit to the original post.
    – samspot
    Mar 19, 2012 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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