I am new to an On-Prem environment. I am trying to automate the deploying or moving of Farm based solution and wsp packages from a local drive to SharePoint 2016 site collection.

I am a newbie to Powershell scripting.

Can someone please provide me with code to move the solution files from local drive and upload them to a SP 2016 site collection and also activate?

Any suggestions will be helpful.


  • Are u trying to install it or just copying it?
    – Waqas Sarwar MVP
    Commented Aug 28, 2018 at 4:07
  • Deploy and activate the wsps.
    – AXA240778
    Commented Aug 28, 2018 at 13:34
  • your solution is on the shared drive not on the SharePoint server, right? if it is shared drive, do sharepoint services account have permission to that location?
    – Waqas Sarwar MVP
    Commented Aug 28, 2018 at 13:38

2 Answers 2


Take a look on Add-SPSolution and Install-SPSolution PowerShell commands.


  • Add-SPSolution -LiteralPath c:\solution1.wsp
  • Install-SPSolution -Identity solution1.wsp -WebApplication http://webapurl -GACDeployment

You'd better refer the steps from the blog below to install wsp package to SharePoint with PowerShell:

Add and Deploy Solution in SharePoint Central Administration Using PowerShell Commands

It has screen capture, easy to understand.

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.