DCPromo is the most complicated thing, that I have found, to do from the Windows Core server. This is because it is one of the most complicated things a normal server will do. As a result, it has a number of options that you need to configure. There are two ways to do this. Most people choose to use a unattended answer file, but I prefer to use switches on the command line. Both options are listed below.
To use an unattended file you will create a file that looks like this;
For a new Domain in a new forest;
[DCInstall]
ReplicaOrNewDomain=Domain
NewDomain=Forest
NewDomainDNSName=testdomain.local
ForestLevel=3
DomainNetbiosName=testdomain
DomainLevel=3
InstallDNS=Yes
ConfirmGc=Yes
CreateDNSDelegation=No
DatabasePath="C:\Windows\NTDS"
LogPath="C:\Windows\NTDS"
SYSVOLPath="C:\Windows\SYSVOL"
SafeModeAdminPassword=*
RebootOnCompletion=Yes
The Forestlevel flag sets the forest to the appropriate forest functional level. This should only be used on new domains. To change the level after you promote, use the MMC tools.
- 3 = 2008 Forest level
- 2 = 2003 Forest level
- 1 = 2000 Forest level.
The same applies to the DomainLevel.
Usage;
C:\>dcpromo /unattend:unattend.txt
To add a Domain Controller to an existing Domain;
[DCInstall]
ReplicaOrNewDomain=Replica
ReplicaDomainDNSName=testdomain.local
InstallDNS=Yes
ConfirmGc=Yes
UserDomain=testdomain.local
UserName=*
Password=*
DatabasePath=C:\Windows\NTDS
LogPath=C:\Windows\NTDS
SYSVOLPath=C:\Windows\SYSVOL
SafeModeAdminPassword=*
RebootOnCompletion=Yes
This will prompt for your username and password on screen, so you don't need a different answer file for each administrator.
In order to promote the DC using command line switches instead of an answer file, it would look like this (all one line);
dcpromo /unattend /InstallDns:yes /dnsOnNetwork:yes /replicaOrNewDomain:replica
/replicadomaindnsname:testdomain.local /DomainNetbiosName:testdomain
/databasePath:"c:\ntds" /logPath:"c:\ntdslogs" /sysvolpath:"c:\sysvol" /safeModeAdminPassword:*
/forestLevel:2 /domainLevel:2 /rebootOnCompletion:yes
Any option that works in the answer file will work for the inline options.
Server Commands Home