Networknet archive Blog

Active Directory: a DCPromo answer file

Originally published Last updated

This example shows how to provision an Active Directory domain from an answer file. The domain and domain controller role can be installed from a script, making the process repeatable. This script was generated for Windows Server 2003.

Create a DCPromo answer file

Copy the text below into a new text file named ad.txt.

Code13 lines
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
[DCInstall]
AdministratorPassword =P@SSWORD1
CreateOrJoin = Create
DomainNetBiosName = 70-296
NewDomainDNSName = 70-296.net
RebootOnSuccess = Yes
ReplicaOrNewDomain = Domain
SiteName = "Default-First-Site"
InstallDNS=yes
ConfirmGc=Yes
TreeOrChild = Tree
UserName=Administrator
Password=P@SSWORD1

Change the administrator password and open a command prompt. Run dcpromo /answer:ad.txt. My answer file installs the DNS server automatically, so make sure the Windows Server source CD-ROM is available locally or in a CD drive.

After the reboot, I verified the domain installation.

image

Active Directory was installed successfully. The answer file lets me reproduce the steps in my lab and prepare for production deployments.

References