Listing 1: Werkzeuge sequenziell installieren # Software-Liste mit Installationsparametern definieren $softwareListe = @( @{ Name = '7-Zip' Path = "$labSources\SoftwarePackages\7z2301-x64.msi" CommandLine = "/quiet /norestart" }, @{ Name = 'Notepad++' Path = "$labSources\SoftwarePackages\npp.8.6.Installer.x64.exe" CommandLine = "/S" }, @{ Name = 'Git' Path = "$labSources\SoftwarePackages\Git-2.43.0-64-bit.exe" CommandLine = "/VERYSILENT /NORESTART" }, @{ Name = 'Visual Studio Code' Path = "$labSources\SoftwarePackages\VSCodeSetup-x64-1.85.1.exe" CommandLine = "/SILENT /mergetasks=!runcode" } ) # Entwickler-VMs identifizieren $devServer = Get-LabVM -Filter *DEV* # Sequenzielle Installation mit Fortschrittsanzeige foreach ($software in $softwareListe) { Write-Host "Installiere $($software.Name) auf $($devServer.Count) VMs..." -ForegroundColor Cyan Install-LabSoftwarePackage ` -Path $software.Path ` -CommandLine $software.CommandLine ` -ComputerName $devServer ` -ErrorAction Stop Write-Host " $($software.Name) erfolgreich installiert" -ForegroundColor Green }