Monday 6 November 2017

How to download a wsp from Central Administration solution gallery?

There were few incidents where we have to extract the wsp from Solution gallery. We have used lot of 3rd party wsp's which were deployed in the wfe's. However we missed the local copy of the wsp's and we have to upgrade those wsp's with new once provided by the vendors.

When we deployed the new version of wsp we faced few problems where we have to deploy back the old wsp. So before deploying a new version from the vendor, we better have a backup of old wsp stored somewhere on the server, so we have an option to rollback if needed.

Here is the simple powershell script to download the wsp.

$myFarm = Get-SPFarm
$myWSP = $myFarm.Solutions.Item(“[wspfilename.wsp]”).SolutionFile
$myWSP.SaveAs(“C:\gakotha\wspfilename.wsp”)