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