Welcome to Dirteam.com/ActiveDir.org Blogs Sign in | Join | Help

The things that are better left unspoken

a blog by Sander Berkouwer


AD Manager Plus

Blog roll



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

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:



So, what can we do with this file?

The file can be used in two ways:

  1. 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

  2. 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 $

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:
Install-WindowsFeature AD-Domain-Services 

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 

Posted: Wednesday, September 12, 2012 9:36 PM by Sander Berkouwer


FMustafa said:

Windows Server 2012 can be seen as a major release for Windows Server. Not just in terms of virtualization (Hyper-V 3.0), storage (SMB 3.0 and Storage Spaces) or manageability, but also in terms of Active Directory. There’s a load of new features, improving the lives of many Active Directory admins!
# October 5, 2012 6:20 PM

Installing System Center prereqs with Powershell | Systemcenterblogs said:

Beeing a lazy admin I tend to reuse my material in new projects. The other day I was implementing another SCOM-solution, and thought I should share my lazy tip:

  1. When you install the Windows Server Roles and Features needed for the server, EXPORT the configuration it to XML.
  2. Save the XML a smart Place, and be sure to take note of the servers and Versions running.
  3. Install the New server by using the XML to ensure that all roles and features are configured identically (if that is what you need). Like this:

    Open powershell, and run this command* Install-WindowsFeature –ConfigurationFilePath “C:\Scripts\Software\Microsoft\SCOM Roles\SCOMWindowsServerRoles.xml”

Just be sure to choose the correct folder and file, and you are good to go. Grab a coffee and let the server do the job. Great for DR-situations as well^^

# August 19, 2013 1:16 PM
Anonymous comments are disabled