Creating a new 2008 domain controller via command line

 In Server Core

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.

  1. Create yourself an unattend.txt file for your domain

change to the root of the c:

Code:

c:
cd

Then create an unattend.txt file

Code:

notepad unattend.txt

Don’t worry about what you call this txt file – it could be called jon.txt for all it matters

  1. 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

  1. Run the DCPromo command – creates a domain controller

at the root type

Code:

cd/
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 for any reason you have to restart this process, you will find the passwords will get blanked out by the system. You will need to reopen c:\unattend.txt and re-enter any passwords you filled in
Comments
pingbacks / trackbacks

Leave a Comment

Contact Us

Call us on: 01332 890460 or Send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt