- Windows Server
dcpromo.log C:\Windows\debug\dcpromo.log
Log of Active Directory Domain Services promotion and demotion of a domain controller; specific to server editions with the AD DS role.
What it’s for
dcpromo.log is written every time a server is promoted to a domain controller or demoted, whether from Server Manager, with the ADDSDeployment cmdlets or with dcpromo in unattended mode. It is one of the logs to open when an AD DS installation or demotion fails.
What it contains
- The technical steps of the operation: prerequisite validation, initial replication, creation or removal of the NTDS database, SYSVOL configuration.
- Windows or Active Directory error codes and the partner domain controller used.
- The full detail of the operation, where
dcpromoui.logonly keeps the progress of the interface.
Risks and best practices
- Leave the file alone while a promotion or demotion is running.
- Once the operation has succeeded, it records what was done, so archive it with your domain documentation.
- It contains domain, site and server names: review it before handing it to a third party.
Useful commands
# Last lines of the logGet-Content "$env:windir\debug\dcpromo.log" -Tail 80
# Errors and failuresSelect-String -Path "$env:windir\debug\dcpromo.log" -Pattern 'error|fail|0x[0-9a-f]{8}' | Select-Object -Last 40
# Check that the server is actually a domain controllerGet-ADDomainController -Discover -ErrorAction SilentlyContinueFormat
Text file. Each line starts with the date and time, followed by the emitting component or function and the message.
Rotation and archiving
Copy the file after each promotion or demotion, before starting another one.
How to read it
Go to the end of the file, find the final error message, then scroll up to the first error in the sequence: the later ones are often consequences of it. Cross-check with dcpromoui.log, the Directory Service log and the DNS Server log.