Wednesday, January 7, 2015

Install Windows Roles & Features from Configuration File

Used to be launching the wizard while installing the Roles & Features for every new server setup, but it might be tiring and repetitive if you have multiple servers to setup at the same time.

One of the ways is to construct a powershell script to include all the features that are needed and run in.

As for someone with limited powershell knowledge like me, there is actually another way to simplify the amount of time needed to each configuration, via an exported configuration settings file

For a start, you will still need to launch the add Roles & Features wizard to customize the required components you need. However, towards the end of the wizard (just before confirming the installation), you can actually click on the “Export configuration settings” and save it as an xml file (default filename is DeploymentConfigTemplate.xml).

image 

Next, once you have the xml file, login in to the server you want to have the exact Roles & Features install, run the following powershell command (with admin rights of course !!) and the server will now start the install the roles and features according to what’s in the configuration template.

install-WindowsFeature –configurationfilepath <full path of your config file>

and displays a status once done

image

* if you include .net framework 3.5, make sure in include the –source pointing to the sxs folder, if not it will attempt to download from the internet

No comments:

Post a Comment