Export Farm Solution wsp Files SharePoint 2007 and 2010

zyip發表於2013-06-26

 

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
$farm.Solutions | % {
$filename = ($pwd.ToString() + "\" + $_.SolutionFile.Name);
write-host ("Saving" + $filename);
$_.SolutionFile.SaveAs($filename)
}

 

 

 

 

 

$farm = Get-SPFarm
$file = $farm.Solutions.Item("extendeddiagnosticproviders.wsp").SolutionFile
$file.SaveAs("c:\temp\extendeddiagnosticproviders.wsp")

相關文章