Data Networking Blog
Blog for Admins

Clone Windows 2012 Roles/Features


I had to create a couple of new Servers today but the instructions were to make them identical to an existing server which sits in a different Data Centre. So I started off by using the Server Manager GUI and noting down the roles features but I realized there were about 71 of them and it would be time consuming to note all of them down and then actually install them on a different machine. There was high possibility I will miss some of them so there had to be a better way. This is how i did it using Power Shell.

Power shell has a module called ServerManager so first we will import this module and check what commands are available with this module.


So the list I was given with Get-WindowsFeatures was long and it even included features not currently installed. So a better way was to only display installed features.

Let’s export this to XML and we will use the XML file to install the same roles and features on our other servers.


Get-WindowsFeature | ? {$_.Installed} | Measure-Object -Line


Now copy the roles-features.xml to new server and run the following command to install these roles/features.


Sometimes you will receive errors stating the sources could not be downloaded as is the case with .Net framework. In such cases you can easily mount Windows 2012 DVD and provide a source argument to Add-Windows Feature like

And that should do the trick.

August 6, 2015 Script, Systems, Windows Jd

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Font Size
Decrease Size Default Size Increase Size
Select Skin
Select Underlay Background
Select Overlay Background
Scheme Switcher Toggle