A. To use an answer file when promoting a DC using the install-from-media function, you must add the following two lines to your answer file:
The second line must contain the path to the location of the DC backup restored files. For example, an answer file might look like
\[Unattended\] Unattendmode=fullunattended \[DCINSTALL\] UserName=
Password= UserDomain= DatabasePath=c:\windows\ntds LogPath=c:\windows\ntds SYSVOLPath=c:\windows\sysvol SafeModeAdminPassword= CriticalReplicationOnly=No SiteName= ReplicaOrNewDomain=Replica ReplicaDomainDNSName= ReplicationSourceDC= ReplicateFromMedia=yes ReplicationSourcePath=c:\NTDSrestore RebootOnSuccess=yes
To use this answer file, enter the command
dcpromo /adv /answer:
Be aware that if you use an answer file for a second time to perform another unattended installation, the passwords will be blank and you'll be prompted to re-enter them. The Dcpromo process removes the passwords from the file each time for security reasons.