NXLog Docs

Windows DHCP client

Windows DHCP client logs are written to Windows Event Log. There are two logs for IPv4 and two for IPv6. To enable the required logs, open Event Viewer (eventvwr) and check the logs under Applications and Services Logs > Microsoft > Windows > Dhcp-Client and Applications and Services Logs > Microsoft > Windows > DHCPv6-Client. To enable a log, right-click on it and click Enable Log.

Enabling DHCP client logs in Windows Event Log

Alternatively, the following PowerShell script will check all four logs, enabling if necessary.

$LogNames = @("Microsoft-Windows-Dhcp-Client/Admin",
ForEach ($LogName in $LogNames) {
    $EventLog = Get-WinEvent -ListLog $LogName
    if ($EventLog.IsEnabled) {
        Write-Host "Already enabled: $LogName"
    else {
        Write-Host "Enabling: $LogName"
        $EventLog.IsEnabled = $true
Example 1. Collecting Windows DHCP client logs with NXLog

This configuration collects events from the IPv4 and IPv6 Admin and Operational DHCP client logs using the im_msvistalog module.

<Input dhcp_client_eventlog>
    Module    im_msvistalog
        <Query Id="0">
          <Select Path="Microsoft-Windows-Dhcp-Client/Admin">*</Select>
          <Select Path="Microsoft-Windows-Dhcp-Client/Operational">*</Select>
          <Select Path="Microsoft-Windows-Dhcpv6-Client/Admin">*</Select>
          <Select Path="Microsoft-Windows-Dhcpv6-Client/Operational">*</Select>
Output sample in JSON format
  "Domain":"NT AUTHORITY",
  "AccountName":"LOCAL SERVICE",
  "AccountType":"Well Known Group",
  "Message":"Parameter request received on interface with LUID 0x6008004000000. Attempting to acquire the interface context.",
  "Category":"Network Parameter State Event",

While we endeavor to keep the information in this topic up to date and correct, NXLog makes no representations or warranties of any kind, express or implied about the completeness, accuracy, reliability, suitability, or availability of the content represented here. We update our screenshots and instructions on a best-effort basis.

The accurateness of the content was tested and proved to be working in our lab environment at the time of the last revision with the following software versions:

NXLog version 5.6.7727
Windows Server 2019
Windows Server 2022

Last revision: 14 November 2022