Unattended Installation Options and Answer Files
You can also add or remove a domain controller in Command Prompt, using unattended installation supported by the Windows Server 2008 R2 version of Dcpromo.exe. Unattended installation options provide values to the Active Directory Domain Services Installation Wizard. For example, the NewDomainDNSName option specifies a fully qualified domain name (FQDN) for a new domain.
These options can be provided at the command line using dcpromo /unattendOption:value; for example, type dcpromo /newdomaindnsname:google.com. Alternately, you can provide the options in an unattended installation answer file. The answer file is a text file that contains a section heading, [DCINSTALL], followed by options and their values in the option=value form. For example, the following file provides the NewDomainDNSName option:
[DCINSTALL] NewDomainDNSName=google.com
The answer file is called by adding its path to the /unattend parameter. For example:
dcpromo /unattend:"path to answer file"
The options in the answer file can be overridden by parameters on the command line. For example, if the NewDomainDNSName option is specified in the answer file and the /NewDomainDNSName parameter is used on the command line, the value on the command line takes precedence.
If any required values are neither in the answer file nor on the command line, the Active Directory Domain Services Installation Wizard prompts for the answers, so you can use the answer file to partially automate an installation, providing a subset of configuration values for
use during an interactive installation. The wizard is not available when running Dcpromo.exe from the command line in Server Core. In that case, the Dcpromo.exe command returns with an error code.
For a complete list of parameters that you can specify as part of an unattended installation of AD DS, open an elevated command prompt and type the following command:
dcpromo /?[:operation]
where operation is one of the following:
- Promotion: Returns all parameters you can use when creating a domain controller.
- CreateDCAccount: Returns all parameters you can use when creating a prestaged account for a read-only domain controller (RODC).
- UseExistingAccount: Returns all parameters you can use to attach a new DC to a prestaged RODC account.
- Demotion: Returns all parameters you can use when removing a domain controller.
NOTE:
When you use the Windows interface to create a domain controller, the Active Directory Domain Services Installation Wizard gives you the option, on the Summary page, to export your settings to an answer file. If you need to create an answer file for use from the command line, such as on a Server Core installation, you can use this shortcut to create an answer file with the correct options and values.
In this tutorial:
- Administering Domain Controllers
- Deploying Domain Controllers
- Unattended Installation Options and Answer Files
- Installing a New Windows Server 2008 R2
- Installing Additional Domain Controllers in a Domain
- Installing an Additional Domain Controller
- Installing a New Windows Server 2008 Child Domain
- Staging the Installation of an RODC
- Installing AD DS from Media
- Managing Operations Masters
- Domain-Wide Operations Master Roles
- Optimizing the Placement of Operations Masters
- Transferring Operations Master Roles
- Seizing Operations Master Roles
- Configuring DFS Replication of SYSVOL
- Understanding Migration Stages