1

need to add and install .wsp file to the Site Collection using PoweShell

1 Answer 1

2

Run this below scripts from SharePoint Management Shell:

For Farm solution

Add-SPSolution “Your WSP Location”\”Your WSP Name”.wsp

Install-SPSolution –Identity "WSP Name".wsp –WebApplication "Site Url" –GACDeployment

For Sandbox solution

Add-SPUserSolution -LiteralPath c:\CandidateSandboxedSolutions\MySandboxedSolution.wsp -Site http://MyServer/sites/Contoso

Install-SPUserSolution -Identity MySandboxedSolution.wsp -Site http://MyServer/sites/Contoso

Hope this will help you!

Reference:

3
  • Thanks!! This is for Web Application right? Is there anything for Site Collection? Commented Mar 27, 2017 at 12:19
  • 1
    WSP are installed at farm level. It gets deployed at web application level. You can activate - deactivate features in the different site collections as per your requirements. Commented Mar 27, 2017 at 12:22
  • if you want to deploy the solutions specifically to site collections you need to build sandbox solutions. Commented Mar 27, 2017 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.