Creating a new 2008 domain controller via command line
Creating a new 2008 domain controller via command line
Whether you like using the command line, or you have to build a server core version of 2008 server, you may be in a position where you need to build a DC using it.
Here’s a guide to do this.
Get yourself a command prompt open or if you are logging into your server core version of your “soon to be a dc” machine, you’ll be presented with one.
- Create yourself an unattend.txt file for your domain
change to the root of the c:
Code:
cd
Then create an unattend.txt file
Code:
Don’t worry about what you call this txt file – it could be called jon.txt for all it matters
- Fill in the appropriate details about your new domain
Type this lot in, changing the values of the NetBIOS name, the DNS Name and the safemode password, to your liking.
[DCINSTALL]
InstallDNS=Yes
DomainNetBiosName=binaryroyale
NewDomainDNSName=binaryroyale.com
SiteName=DefaultSite (pick something)
ReplicaOrNewDomain=domain
NewDomain=forest
ForestLevel=3 (if you want only 2008 DC’s on your network, 2 if some 2003, 1 if some 2000)
DomainLevel=3 (as above)
DatabasePath=c:whatever – omit line if you want windows to place in default location
LogPath=c:whatever – omit line if you want windows to place in default location
SYSVOLPath=c:whatever – omit line if you want windows to place in default location
SafeModeAdminPassword=Password1234
RebootOnSuccess=Yes
Now close the unattend.txt file and save it. See links for more details
http://www.petri.co.il/unattended_installation_of_active_directory.htm
http://support.microsoft.com/kb/223757
- Run the DCPromo command – creates a domain controller
at the root type
Code:
dcpromo /unattend:unattend.txt
This will install DNS and all the necessary binaries to get your server promoted and turned into the 1st domain controller on your network.
This will reboot your system and next time you’ll have to login using
U= domainname/administrator
P= one defined in the unattend.txt file
If you get any errors when running the dcpromo command, make sure you have the details in the unattend file correct and also re-fill in the password and save, before you try again.
[…] If you now want to turn this into your first DC on a new domain, read this […]