Retract a Solution
Scenario/Problem: You need to retract a deployed solution from a web application or global deployment.
Solution: Use the UnInstall-SPSolution cmdlet with a solution variable.
The Uninstall-SPSolution cmdlet enables you to retract a specific solution that was previously deployed. Use this in conjunction with the Get-SPSolution cmdlet (explained in a previous section), as shown in Listing 9.5.
Listing 9.5. Retracting a Solution from a Web Application
$solution = Get-SPSolution-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bdUninstall-SPSolution $solution -WebApplication "SharePoint - 80"
Providing the -WebApplication parameter retracts the solution from the specified web application (assuming that the solution was deployed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access