locked
Error when uninstall wsp by share point management shell RRS feed

  • Question

  • Hello,

     I have tried to uninstall .wsp by sharepoint 2010  management shell :

         Uninstall-SPSolution -Identity Tes.wsp

     I get the following error : "Uninstall-SPSolution : This solution contains resources scoped for a Web applic ation and must be retracted from one or more Web applications."

    How Can I solve it?


    ASk

    Thursday, October 25, 2012 6:18 PM

Answers

  • Hello,

    as said by the error , you need to specify the web application where your wsp is deployed

    something like this

    Uninstall-SPSolution –Identity Tes.wsp –WebApplication http://serverurl

    if your solution is globally deployed , use this

    Uninstall-SPSolution -Identity tes.wsp -AllWebApplications


    Best regards, Christopher.
    Blog | Mail
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.
    Why mark as answer?


    Thursday, October 25, 2012 6:27 PM
    Answerer

All replies

  • Hello,

    as said by the error , you need to specify the web application where your wsp is deployed

    something like this

    Uninstall-SPSolution –Identity Tes.wsp –WebApplication http://serverurl

    if your solution is globally deployed , use this

    Uninstall-SPSolution -Identity tes.wsp -AllWebApplications


    Best regards, Christopher.
    Blog | Mail
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.
    Why mark as answer?


    Thursday, October 25, 2012 6:27 PM
    Answerer
  • Hi,

    This is a knows problem which occurs on those WSP which are deployed Globally.

    You must first specify with the -webapplication switch the Web Application from which the solution is retracted. Failure to do this will result in this above error.

    Try this :

    	
    uninstall-spsolution -identity SampleSolution.wsp -webapplication http://server -confirm:$false

    Let me know if this helps. Else I can guide another workaround.


    Thanks, Ali Yasir

    Thursday, October 25, 2012 6:38 PM