kwizcom banner advertisement

Extract and Download All Installed Farm Solution Packages (WSP Files) in SharePoint

There were many solution packages installed in my current SharePoint environment. During a server replacement we noticed that the WSP file for a particular solution is missing in TFS! (Our version control repository!)

Thankfully, we have a solution to this issue using: http://archive.msdn.microsoft.com/SPSolutionExtractor. To extract and download all installed solution WSP files, Just execute:  
SharePointFarmSolutionExtractor.exe -extractAll c:\SharePointSolutions

which will extract all WSP files from installed solutions!
Download All Installed Solution Packages (WSP Files) in SharePoint

Export all Farm Solutions (WSP) from central admin with PowerShell in SharePoint:
$dirName = "c:\Solutions"
foreach ($solution in Get-SPSolution)
{
    $id = $Solution.SolutionID
    $title = $Solution.Name
    $filename = $Solution.SolutionFile.Name
    $solution.SolutionFile.SaveAs("$dirName\$filename")
}
 
Download farm solution wsp in SharePoint 2013
If you want to download a particular solution, use this PowerShell Script:
$farm = Get-SpFarm
$SolutionFile = $farm.Solutions.Item("SolutionName.wsp").SolutionFile
$SolutionFile.SaveAs("D:\SolutionFile.wsp")

Download SharePoint solution from farm in SharePoint 2007:
[void][reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint")

#Get Farm object
[Microsoft.SharePoint.Administration.SPFarm]$farm = [Microsoft.SharePoint.Administration.SPFarm]::get_Local()

#Create a Directory for Solutions
if ( (Test-Path -path "c:\Solutions\") -ne $True)
{
 New-Item c:\Solutions\ -type directory
}

$dirName = "c:\Solutions"

foreach ($solution in $farm.Solutions)
{   
    Write-Host "Downloading solution $($Solution.Name)"
    $filename = $Solution.SolutionFile.Name
    $solution.SolutionFile.SaveAs("$dirName\$filename")
}  

Extract and Download All Installed Farm Solution Packages (WSP Files) in SharePoint Extract and Download All Installed Farm Solution Packages (WSP Files) in SharePoint Reviewed by Salaudeen Rajack on October 03, 2011 Rating: 5

1 comment:

  1. Thanks for nice article about "Want to Extract the .WSP file from installed Solutions in SharePoint?"

    Regards
    http://www.sharepoint.inf4web.com

    ReplyDelete

Please Login and comment to get your questions answered!

Powered by Blogger.