Tuesday, 20 August 2013

Get or Download WSP from Solution Store

There might be a situation where you need to take the backup of WSP which is already installed in the server before installing the updated WSP.

This scenario occurs most of the time during the production release.

Following is the PowerShell script to get the WSP from SharePoint 2010 solution store which.  

$farm = Get-SPFarm
$file = $farm.Solutions.Item("MySolution.wsp").SolutionFile
$file.SaveAs("C:\MySolution.wsp")