need to add and install .wsp file to the Site Collection using PoweShell
1 Answer
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:
- http://www.c-sharpcorner.com/UploadFile/5b1f04/add-and-deploy-solution-in-sharepoint-central-administration/
- http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/12/02/adding-and-deploying-solutions-with-powershell-in-sharepoint-2010.aspx
- https://blogs.msdn.microsoft.com/sharepointdeveloperdocs/2010/10/28/how-to-install-sandboxed-solution-with-powershell-sharepoint-management-shell/
-
Thanks!! This is for Web Application right? Is there anything for Site Collection? Commented Mar 27, 2017 at 12:19
-
1WSP 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