psdownloadallwsp

Title: Download All WSP's from Farm

Description: We are deploying the latest code and need to take up the all WSP's from Farm. In case code not work after deployement, we may require to re deploye the old WSP's

Powershell Script:

  1. [Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")   
  2. $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local   
  3.   
  4. # Get the Present Path  
  5. $path = Split-Path $MyInvocation.MyCommand.Path  
  6. # Create the Folder name Solutions  
  7. [Void]( ni "$path\Solutions" -type Directory -force )   
  8.   
  9. $farm.Solutions |% {   
  10.   Write-Host $_.Name   
  11.   $solution = $_.SolutionFile   
  12.   $solution.SaveAs("$path\solutions\$($solution.Name)")   


Out Put:

Open the Solutions folder and see all wsp's
ex:
Test.wsp
Customer.DataProcess.wsp