Upgrade a Deployed Solution
Scenario/Problem: You have an updated solution package that needs to be deployed to SharePoint.
Solution: Use the Update-SPSolution cmdlet with a solution variable.
The Update-SPSolution cmdlet enables you to upgrade a previously deployed solution with a newer version of the solution package (and underlying files). Use this in conjunction with the Get-SPSolution cmdlet (explained in a previous section), as shown in Listing 9.8.
Listing 9.8. Sample Configuration Script for Upgrading a Solution
$solution = Get-SPSolution-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bdUpdate-SPSolution $solution -LiteralPath "c:\newsolution.wsp" -Force-GACDeployment
The -LiteralPath determines the location of the updated solution package. ...
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