Skip to contentGo to the directory tree
  1. C:
  2. Windows
  3. debug
  4. adprep\logs
FolderRisk: Caution
  • Windows Server

adprep\logs C:\Windows\debug\adprep\logs

adprep\logs: Adprep logs, one timestamped subfolder per run, created when preparing the Active Directory schema, forest or domain.

Updated on By AltF4 Formation

What it’s for

Adprep prepares an Active Directory forest or domain before a newer domain controller joins: schema extension, configuration partition updates, permissions. Each run leaves its report here, useful when adprep /forestprep or /domainprep fails, or to show when and by whom the schema was extended. Since Windows Server 2012, promotion (Install-ADDSDomainController, the AD DS wizard) runs Adprep automatically with Enterprise Admins credentials; the logs land in the same place.

What it contains

One subfolder per run, named after the date and time (for example 20260315102030). It holds the main log adprep.log and, depending on the operation, side files such as Csv.log and Ldif.log (schema imports). The path adprep\logs skips a level: the adprep folder itself sits under C:\Windows\debug.

Risks and best practices

  • Keep these folders: they document the schema history and cost no noticeable space, though normal operation never needs them.
  • Run Adprep on the schema master (forestprep) or the infrastructure master (domainprep), with a Schema Admins and Enterprise Admins account for forestprep.
  • Before extending the schema, check the current version and replication health (repadmin /replsummary).

Useful commands

Fenêtre de terminal
# Adprep runs, newest first
Get-ChildItem "$env:windir\debug\adprep\logs" -Directory | Sort-Object Name -Descending
# Current schema version
Get-ADObject (Get-ADRootDSE).schemaNamingContext -Properties objectVersion | Select-Object objectVersion
# End of the main log of the last run
$d = Get-ChildItem "$env:windir\debug\adprep\logs" -Directory | Sort-Object Name | Select-Object -Last 1
Get-Content (Join-Path $d.FullName 'adprep.log') -Tail 40
Fenêtre de terminal
:: Replication health before a schema extension
repadmin /replsummary

Report a mistake