The following example will help you to quickly provision an Active Directory domain in vm or other lab environments. The provision of domain controller can be controlled and reproduced same way as before.  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

Review the local administrator password and open a cmd shell on your Windows Server. Run dcpromo /answer:ad.txt. In the example answer file I automatically install the DNS server; make sure the Windows Server source cd-rom is available locally or in a cd drive.

For more options go to http://support.microsoft.com/kb/223757/en-us or  http://www.petri.co.il/unattended_installation_of_active_directory.htm.

After the reboot and logon with Domain Administrator account I verify the installation with ADUC (dsa.msc) console.

image

The Active Directory domain was successfully installed. Using the answer file I am able to redo my lab environments and prepare myself for production deployments.