Date Posted: Aug 17, 2010
Author: Jared Heinrichs
Posted in Active Directory (2003) and tagged How To.How to use a dcpromo unattended script for first DC
This article will go over how to completely automate setting up active directory. While this might or might not help you if you are setting things up with the Window GUI, I can tell you this will save your behind if you are wanting to install Active Directory to a server core box!
There are some things that you will have to change in this script! In this script my Fully Qualified domain name is going to be called: “heinrichs.domain”. If you were to only change the FQ domain name everything else is the Active Directory defaults in the GUI install. Fortunately for most people Microsoft chose some very good defaults and unless you are some enormous enterprise outfit this script should also work for you.
Bellow if the setup file for the Active Directory setup and install. First make a directory on C: called “scripts”. Make a file called “dcpromo-answer.txt” and copy this info into that file.
[DCInstall] You will want open a command prompt. You will need to type this command:
; New forest promotion
ReplicaOrNewDomain=Domain
NewDomain=Forest
NewDomainDNSName=heinrichs.domain
ForestLevel=3
DomainNetbiosName=HEIINRICHS
DomainLevel=3
InstallDNS=Yes
ConfirmGc=Yes
CreateDNSDelegation=No
DatabasePath="C:\Windows\NTDS"
LogPath="C:\Windows\NTDS"
SYSVOLPath="C:\Windows\SYSVOL"
; Set SafeModeAdminPassword to the correct value prior to using the unattend file
SafeModeAdminPassword=
; Run-time flags (optional)
; RebootOnCompletion=Yes
dcpromo.exe /unattend:C:\scripts\dcpromo-answer.txt
Once you do that you should have a fully working Domain Controller with Active Directory installed and setup!
