Export SharePoint Farm Solutions

Source: http://manish-sharepoint.blogspot.com/2010/05/retriving-sharepoint-wsp-files-from.html
Language:
PowerShell
Keywords:
SharePoint
Code Snippet

[Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local 

 

$path = Split-Path $MyInvocation.MyCommand.Path 

[void]( ni "$path\Solutions" -type Directory -force ) 

 

$farm.Solutions |% { 

  Write-Host $_.Name 

  $solution = $_.SolutionFile 

  $solution.SaveAs("$path\solutions\$($solution.Name)") 

}


Created 2012-12-02
comments powered by Disqus
Login