Choose Skin

How to download or update the deployed wsp solution and install new wsp solution in sharepoint farm using Powershell.



Manish Kumar
Computer

Script to Download the deployed WSP solution from Sharepoint Farm

  $farm = Get-SpFarm  
  $file = $farm.Solutions.Item(“mySolution.wsp”).SolutionFile     
  $file.SaveAs(“C:UsersmkumarDesktopmySolution.wsp”) 


Script to Update the deployed WSP solution from Sharepoint Farm

  Update-SPSolution -Identity mySolution.wsp -LiteralPath C:UsersmkumarDesktopmySolution.wsp -GACDeployment


Script to Install the new WSP solution in Sharepoint Farm

  Add-SPSolution "C:UsersmkumarDesktopmySolution.wsp"


Script to Install the new WSP solution in Sharepoint Farm

  Install-SPSolution –Identity "mySolution.wsp" –WebApplication http://mysharepointsite:80 -GACDeployment

  or

  Install-SPSolution -identity "mySolution.wsp" -GACDeployment