Networknet archive Blog

Active Directory: a DCPromo answer file

Originally published Last updated

By Ivan Versluis

An answer file makes Active Directory domain installation repeatable. This Windows Server 2003 example installs the domain and domain controller role from a script, so I can reproduce the process in my lab and prepare for production deployments.

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