Promotes or Demotes an Active Directory domain controller Command line parameters include: /answer[:filename /unattend[:filename ...

Promotes or Demotes an Active Directory domain controller

Command line parameters include:

   /answer[:filename]

   /unattend[:filename]

   /adv

   /CreateDCAccount

   /UseExistingAccount:Attach

/answer is used to supply an unattended install script file.
/unattend is used to specify the unattend operation mode
/adv enables advanced user options.
/CreateDCAccount specifies to create a read-only domain controller account
/UseExistingAccount:Attach specifies to attach the server you are promoting to the read-only domain controller account you created for it previously

/CreateDCAccount and /UseExistingAccount:Attach are mutually exclusive.
Unattended installation parameters can also be specified on the
command-line.  For example:

   dcpromo.exe /ReplicaOrNewDomain:Replica