Exportieren der Einstellungen in eine CSV vom Quellserver und Installieren auf einem anderen Zielserver
< Write-Host Write-Host "Copy Roles and Features from one Server to another" -foreground "yellow" Write-Host $ServerNameSource = Read-Host "ServerName of Source Server" $ServerNameDest = Read-Host "ServerName of Destination Server" function Get-ScriptDirectory { $Invocation = (Get-Variable MyInvocation -Scope 1).Value Split-Path $Invocation.MyCommand.Path } $ScriptPath = Get-ScriptDirectory Get-WindowsFeature -ComputerName $ServerNameSource | where{$_.Installed -eq $True} | select name | Export-Csv $ScriptPath\Roles_$ServerNameSource.csv -NoTypeInformation -Verbose Start-Sleep -s 30 Import-Csv $ScriptPath\Roles_$ServerNameSource.csv | foreach{Add-WindowsFeature $_.name -computerName $ServerNameDest}