Friday, October 26, 2012

Retrieve Single Wsp from the Central Admin

Add-PsSnapin Microsoft.SharePoint.Powershell –ErrorAction SilentlyContinue

$dirName = "c:\ExportedSolutions\"
if (!(Test-Path -path $dirName))
{
New-Item $dirName -type directory
}
Write-Host Exporting solution to $dirName
$farm = Get-SPFarm
$file = $farm.Solutions.Item("treeviewdocumentlibrary.wsp").SolutionFile
$file.SaveAs($dirName + "treeviewdocumentlibrary.wsp")

No comments:

Post a Comment