Friday, 4 August 2017

How to take Backup of WSP in SharePoint Server using PowerShell Script


Hello All, Today I am writing about How to take Backup of WSP in SharePoint Server using PowerShell Script.
WSP (Windows SharePoint Solution) WSP files are CAB files including all set of features and functionality, site definitions, services and other required custom availability. WSP files can be reuse and easily deploy to other SharePoint farms, in case if we have not configured Web Application URL under the same WSP.
Below are the steps to take backup file existing solution using SharePoint PowerShell:

·         Login to the server and run SharePoint PowerShell management Tool as Administrator.
·         Once PowerShell opened copy the below script and hit enter

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


Once above command executed we can get wsp file on given file.

Thanks