If upgrading a domain controller ensure the following commands are run first.
D:\support\adprep\adprep /forestprep D:\support\adprep\adprep /domainprep
From the archive. Written in 2012 and kept for the record, so some of it has dated.
If upgrading a domain controller ensure the following commands are run first.
D:\support\adprep\adprep /forestprep D:\support\adprep\adprep /domainprep