How to extract WSP from SharePoint 2010 Central Admin
Problem
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:
Using Console Application to Extract WSP
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:
- Using Console application to Extract WSP
- Using Power Shell Script
Using Console Application to Extract WSP
SPSolutionCollection solutions = SPFarm.Local.Solutions;Using Power Shell
foreach (SPSolution solution in solutions)
{
SPPersistedFile wspFile = solution.SolutionFile;
wspFile.SaveAs("c:\\wsp\\" + solution.Name);
}
$farm = Get-SPFarm
$file = $farm.Solutions.Item("custom.wsp").SolutionFile
$file.SaveAs("c:\temp\ custom.wsp")
NICE INFO!
ReplyDelete