Ever wanted to install all the roles and features that are installed on one server on another server? Easy. Just copy and paste the following command into an elevated powershell on the server where the roles and features are installed. Then copy the output and paste it into an elevated powershell on the other server:
Get-WindowsFeature | ? { $_.Installed } | Select Name | ForEach-Object { "Install-WindowsFeature $($_.Name)" }
This article was very helpful! We were able to automate the setup of new vmware/windows servers… we are now able to quickly recreate any server!!
Can this be done from Server 2012 R2 to Server 2016 or 19?
Very useful and worked like a charm, thanks!