FolderRisk: Caution
- Windows Server
dhcp C:\Windows\System32\dhcp
DHCP Server role folder: lease database, automatic backups and audit logs of the Windows Server DHCP service.
What it’s for
System32\dhcp exists as soon as the DHCP Server role is installed. It holds the Jet database of leases and server configuration, its automatic backup and the service’s audit logs. It is the default location of the database and logs (%windir%\System32\Dhcp), which you can move.
What it contains
dhcp.mdb: the server database (leases, reservations, scopes), in Jet format.- The database logging files:
j50.log,j50.chkandtmp.edb. backup: the periodic backup of the database and configuration, made automatically by the service (every 60 minutes by default).- The audit logs
DhcpSrvLog-<day>.logandDhcpV6SrvLog-<day>.log, one per day of the week (for exampleDhcpSrvLog-Mon.log).
Risks and best practices
- Without its database and Jet logs, the service loses the lease list and may hand out duplicate addresses.
- Do not copy
dhcp.mdbwhile the service is running: useBackup-DhcpServerorExport-DhcpServer. The neighboringbackupfolder does not protect against losing the disk, so keep an off-server copy as well. - To move the database, use
Set-DhcpServerDatabaserather than a manual copy. - The audit logs recycle themselves every week, so archive them before analysis.
Useful commands
# Folder contents (as administrator; read-only)Get-ChildItem "$env:windir\System32\dhcp" -Force | Select-Object Name, Length, LastWriteTime
# Database location and backup settingsGet-DhcpServerDatabase
# Audit logging settingsGet-DhcpServerAuditLog
# Back up the database and configuration (as administrator; adjust target folder)Backup-DhcpServer -Path "D:\DHCP-Backups"