Reusing a Role Installation XML file in Windows Server 2012 to install the Active Directory Domain Services Role

Reading Time: 2 minutes

Control PanelRanging from multi-server management to over 2400 PowerShell Cmdlets, Windows Server 2012 delivers on the promise of standards-based management and automation capabilities.

Part of the new Domain Controller Promotion process is installing the Active Directory Domain Services role onto a stand-alone or member server. This activity needs to be completed before the new Active Directory Domain Services Configuration Wizard can be launched.

As part of the installation of a Server Role and/or Feature, on the Confirm installation selections screen of the Add Roles and Features Wizard an option is provided to Export configuration settings. The screenshot below shows this option as part of installing the Active Directory Domain Services role and its management features:

Confirm installation selections screen of the Add Roles and Features Wizard (click for larger screenshot)

When you click this option, an XML-formatted file is generated, that contains all the choices made in the previous screens of the Add Roles and Features Wizard. This file is presented to you as DeploymentConfigTemplate.xml to save at a convenient file location.

Below is the DeploymentConfigTemplate.xml, containing the choices made when installing the Active Directory Domain Services role and its management features:

AddADDSRole6

 

So, what can we do with this file?

The file can be used in two ways:

  • Install the same Server Role(s) and/or Feature(s) on another Windows Server by copying the file over to a (shared) file location and executing the following PowerShell one-liner on the console of the server:

Install-WindowsFeature –ConfigurationFilePath
D:\ConfigurationFiles\DeploymentConfigTemplate.xml

  • Install the same Server Role(s) and/or Feature(s) on (a group of) remote server(s) with the DeploymentConfigTemplate.xml in a local file location , using the following PowerShell one-liner:

Install-WindowsFeature –ConfigurationFilePath
D:\ConfigurationFiles\ADCSConfigFile.xml -ComputerName $
servername

Since installing the Active Directory Domain Services role and its management features does not require a restart, you could then start the Install-ADDSForest, Install-ADDSDomain or Install-ADDSDomainController Cmdlets to promote the server to a Domain Controller for either a new forest, a Domain Controller for a new domain in an existing forest or as a new replica Domain Controller, respectively.

This way you can quickly configure new Domain Controllers.

Note:
While installing Server Role(s) and/or Feature(s) this way offers great flexibility and granularity, for simpler environments the following PowerShell one-liner might be of more use:

Install-WindowsFeature AD-Domain-Services 
-IncludeManagementTools

By the way: If you don’t want the management tools, simply leave the
-IncludeManagementTools switch out.

 

Further reading

Install or Uninstall Roles, Role Services, or Features
Install-WindowsFeature

2 Responses to Reusing a Role Installation XML file in Windows Server 2012 to install the Active Directory Domain Services Role

  1.  

    Useful information!

  2.  

    Thank's for this post !

leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.