Skip to contentGo to the directory tree
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.

Updated on By AltF4 Formation

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.chk and tmp.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>.log and DhcpV6SrvLog-<day>.log, one per day of the week (for example DhcpSrvLog-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.mdb while the service is running: use Backup-DhcpServer or Export-DhcpServer. The neighboring backup folder does not protect against losing the disk, so keep an off-server copy as well.
  • To move the database, use Set-DhcpServerDatabase rather than a manual copy.
  • The audit logs recycle themselves every week, so archive them before analysis.

Useful commands

Fenêtre de terminal
# Folder contents (as administrator; read-only)
Get-ChildItem "$env:windir\System32\dhcp" -Force | Select-Object Name, Length, LastWriteTime
# Database location and backup settings
Get-DhcpServerDatabase
# Audit logging settings
Get-DhcpServerAuditLog
# Back up the database and configuration (as administrator; adjust target folder)
Backup-DhcpServer -Path "D:\DHCP-Backups"

Folder contents

Report a mistake