1.9 KiB
Solutions herunterladen
Dienstag, 21. März 2017
11:29
(Get-SPFarm).Solutions | ForEach-Object{$var = (Get-Location).Path + "\" + $_.Name; $_.SolutionFile.SaveAs($var)}
Speichert alle Solutions in den aktuellen Ordner
Oder eine Script von Roy Berger :
$farm = Get-SPFarm
#Speicherort
Write-Host " "
Write-Host " "
Write-Host "Speicherpfad: " -NoNewLine -ForegroundColor Cyan
$loc = Read-Host
Write-Host " "
Write-Host " "
$variable = get-spsolution
$variable_count = $variable.count
$x=1
foreach($solution in $farm.Solutions){
$solution_name = $solution.name.ToUpper()
for ($i = 1; $i -le 100; $i++ )
{write-progress -activity "Download Solution $x of $variable_count - $solution_name... $i%" -percentcomplete $i;}
$solution = $farm.Solutions[$solution.Name]
$file = $solution.SolutionFile
$file.SaveAs($loc + '\' + $solution.Name)
$x++
}
Write-Host "Verbose: Solution runtergeladen in: $loc" -ForegroundColor yellow
$all_solutions = get-spsolution
$all_solutionsdeployed = get-spsolution | where{$_.Deployed -match "True"}
$all_solutionglobaldeployed = get-spsolution | where{$_.DeploymentState -eq "GlobalDeployed"}
Write-Host "Verbose: Anzahl Solutions: " $all_solutions.count -ForegroundColor yellow
Write-Host "Verbose: Anzahl Solutions Deployed in SharePoint farm: " $all_solutionsdeployed.count -ForegroundColor yellow
Write-Host "Verbose: Anzahl Global Solutions Deployed in SharePoint farm: " $all_solutionglobaldeployed.count -ForegroundColor yellow
Write-Host " "
Get-ChildItem $loc | select Name,LastWriteTime
Hierzu siehe auch :