zettelkasten/OneNoteExport/Technik/Powershell/Sharepoint 2013/01_Solutions herunterladen.md
2023-08-17 19:32:37 +02:00

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 :

https://blogs.msdn.microsoft.com/sharepoint_bar__grill/2011/05/05/using-powershell-to-export-all-solutions-from-current-2010-farm-and-programatically-import-and-deploy-them/