Scenario/Problem: You have an updated sandboxed solution package that needs to be deployed to a site collection.
Solution: Use the Update-SPUserSolution
cmdlet with a sandboxed solution variable.
The Update-SPUserSolution
cmdlet enables you to upgrade a previously deployed sandboxed solution with a newer version of the sandboxed solution package (and underlying files). You first need to add the new package to the site collection, as shown in Listing 9.15.
Add-SPUserSolution -LiteralPath "c:SBSolution2.wsp"
-Site "http://intranet.sp2013.com/sites/UserSC"
$userSolution = Get-SPUserSolution
-Identity c0e31dec-294d-4f2d-9ae4-f2e637c766bd
Update-SPUserSolution $userSolution
-site "http://intranet.sp2013.com/sites/UserSC"
-ToSolution SBSolution2
18.221.53.209