How to extract WSP from SharePoint 2010 Central Admin


My Client requirement makes the exact replica of the SharePoint server to another location. There is some custom WSP installed on the server. So SharePoint 2010 Central admin will not allow us to download the WSP from there. Customer wanted to download the WSP Solutions.
stsadm, there’s not a command to download a solution.

Purposed solution:
  1. Using Console application to Extract WSP
  2. Using Power Shell Script

Using Console Application to Extract WSP
SPSolutionCollection solutions = SPFarm.Local.Solutions;
foreach (SPSolution solution in solutions)
    SPPersistedFile wspFile = solution.SolutionFile;
    wspFile.SaveAs("c:\\wsp\\" + solution.Name);
 Using Power Shell
$farm = Get-SPFarm
$file = $farm.Solutions.Item("custom.wsp").SolutionFile
$file.SaveAs("c:\temp\ custom.wsp")

Popular posts from this blog

SharePoint RPC Protocols Examples Using OWSSVR.DLL

STS CryptographicException Error : Key set does not exist

SharePoint 2016 JavaScript framework