- 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.
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
# Adprep runs, newest firstGet-ChildItem "$env:windir\debug\adprep\logs" -Directory | Sort-Object Name -Descending
# Current schema versionGet-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 1Get-Content (Join-Path $d.FullName 'adprep.log') -Tail 40:: Replication health before a schema extensionrepadmin /replsummary