Reusing a Role Installation XML file in Windows Server 2012 to install the Active Directory Domain Services Role
Ranging 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:
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:
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 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:
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 New-ADDSForest, New-ADDSDomain or New-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.
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:
By the way: If you don’t want the management tools, simply leave the
-IncludeManagementTools switch out.
Install or Uninstall Roles, Role Services, or Features