The following example demonstrates how to provision an Active Directory domain from an answer file. The installation of domain and domain controller role can be controlled from script and reproduced. This script has been generated for a Windows Server 2003.
How to create answer file from DCPromo.exe?
Copy the text below and create new text file named ad.txt.
[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 password for the administrator and open a command prompt. Run dcpromo /answer:ad.txt. In my answer file DNS server is installed automatically; make sure the Windows Server source cd-rom is available locally or in a cd drive.
After the reboot and I verified the installation of the domain.
Active Directory was successfully installed. Using the answer file I am able to reproduce the steps in my lab environment and prepare myself for production deployments.
Leave a comment