Scenario/Problem: You need to add a sandboxed solution to a specific site collection.
Solution: Use the Add-SPUserSolution
cmdlet.
Using the Add-SPUserSolution
cmdlet adds a solution package (.wsp
) to a site collection. All you need to provide the cmdlet is the actual location of the sandboxed solution package and the site collection, as shown in Listing 9.10.
Add-SPUserSolution -LiteralPath "c:SBSolution.wsp" -Site
"http://intranet.sp2013.com/sites/UserSC"
The sandboxed solution package location is the -LiteralPath
parameter, which is required. The path can be a local drive location or network location using a UNC string (\servernamefolder
).
The -Site
parameter is the site collection path to which the sandboxed solution should be deployed.
18.222.138.230