Skip to contentGo to the directory tree
  1. C:
  2. Windows
  3. debug
  4. dcpromo.log
LogRisk: Caution
  • 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.

Updated on By AltF4 Formation

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.log only 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

Fenêtre de terminal
# Last lines of the log
Get-Content "$env:windir\debug\dcpromo.log" -Tail 80
# Errors and failures
Select-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 controller
Get-ADDomainController -Discover -ErrorAction SilentlyContinue

Format

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.

Report a mistake