Export Farm Solution wsp Files SharePoint 2007 and 2010

 

[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")

你可能感兴趣的:(SharePoint)