How to Enable and Configure Analytic and Debug Event Logs in Windows 11 Using PowerShell

In Windows 11, the Windows Event Log infrastructure provides deep diagnostic logging across hundreds of operating system subsystems, kernel drivers, and background services. While standard Administrative and Operational logs (such as System, Application, and Security) are enabled by default and visible within the Event Viewer GUI, troubleshooting complex networking timeouts, Hyper-V initialization failures, BitLocker encryption bottlenecks, or driver communication errors often requires access to low-level Analytic and Debug channels.

Analytic and Debug logs record high-volume Event Tracing for Windows (ETW) events directly from kernel and user-mode providers. Because these channels generate significant event traffic, Windows keeps them disabled by default to prevent storage overhead. Furthermore, enabling these logs through the Event Viewer GUI requires navigating nested provider trees and manually clicking through property dialogues. Using PowerShell and the native wevtutil.exe utility, system administrators and security analysts can script the discovery, activation, circular buffer sizing, and automated collection of Analytic and Debug logs.

Architecture of Windows Event Log Channels: Admin, Operational, Analytic, and Debug

Windows Event Log organizes provider events into four distinct channel types:

  • Admin: Targeted at administrators and end-users, recording critical failures and warnings that require manual intervention.
  • Operational: Records routine operational events that trace the normal execution workflow of a feature or background service.
  • Analytic: High-volume telemetry recording detailed programmatic execution steps, state transitions, and performance timestamps. Analytic logs write directly to non-human-readable circular binary files (.etl) to minimize I/O overhead.
  • Debug: Used by software and systems engineers to capture granular component tracing, internal function arguments, and memory addresses when diagnosing reproducing bugs.

Before an Analytic or Debug log can capture events, its channel must be explicitly enabled. Once enabled, events are buffered in RAM and flushed to dedicated log files residing in C:\Windows\System32\Winevt\Logs\.

Discovering Available Analytic and Debug Logs with PowerShell

Windows 11 includes over a thousand registered event log channels. You can use Get-WinEvent in PowerShell to query registered channels and filter for disabled diagnostic logs.

Launch an elevated PowerShell session as Administrator and execute:

# Discover all registered Analytic and Debug channels
Get-WinEvent -ListLog * -Force | Where-Object { 
    $_.LogType -in "Analytic", "Debug" 
} | Select-Object LogName, LogType, RecordCount, IsEnabled | Format-Table -AutoSize

To search for specific subsystem logs (such as networking, Wi-Fi, or Hyper-V):

# Search for disabled networking and Wi-Fi diagnostic logs
Get-WinEvent -ListLog "*WLAN*", "*Ndis*", "*TCPIP*" -Force | Select-Object LogName, LogType, IsEnabled

Enabling Analytic and Debug Channels Using wevtutil and PowerShell

Because Analytic and Debug channels operate via high-speed ETW sessions, modifying their operational state is most reliably executed via the native wevtutil utility or through specialized WMI/CIM providers.

To enable an Analytic log channel—for example, the WLAN AutoConfig diagnostic channel used to troubleshoot Wi-Fi 802.1X enterprise authentication failures:

$LogName = "Microsoft-Windows-WLAN-AutoConfig/Diagnostic"

# Enable the channel
wevtutil sl $LogName /e:true

Similarly, to enable the network driver interface specification (NDIS) diagnostic trace:

wevtutil sl "Microsoft-Windows-NDIS/Diagnostic" /e:true

Verify that the channel is now active and receiving events:

Get-WinEvent -ListLog $LogName -Force | Select-Object LogName, IsEnabled, LogMode, MaximumSizeInBytes

Configuring Maximum Log File Sizes and Circular Retention Policies

Because Analytic logs generate hundreds of events per second during active workload testing, the default file size (typically 1MB or 20MB) may roll over too quickly. You can configure the maximum file size (in bytes) and enforce circular retention.

To increase the buffer size to 100MB (104,857,600 bytes) and set retention to overwrite events as needed (circular mode):

$LogName = "Microsoft-Windows-WLAN-AutoConfig/Diagnostic"

# Set maximum size to 100MB
wevtutil sl $LogName /ms:104857600

# Set log retention mode to circular (overwrite oldest events)
wevtutil sl $LogName /rt:false

If you prefer archiving logs automatically when the buffer reaches capacity rather than overwriting events, set retention to true:

# Enable automatic archival on buffer saturation
wevtutil sl $LogName /rt:true /ab:true

Querying and Exporting Analytic Log Events

Because active Analytic and Debug logs utilize raw binary tracing formats, attempting to read them using standard Get-WinEvent -LogName <name> while the log is actively enabled can sometimes return an error stating that the channel is locked by an active session.

To read events from an active or recently disabled Analytic channel, specify the -Oldest or -MaxEvents parameter with Get-WinEvent:

Get-WinEvent -LogName $LogName -MaxEvents 20 -Oldest | Format-Table TimeCreated, Id, LevelDisplayName, Message -Wrap

To safely capture the complete trace log for offline analysis or submission to vendor engineering, export the log directly to an .evtx file:

wevtutil epl $LogName "C:\Logs\WlanDiagnosticTrace.evtx"

You can then inspect the exported EVTX file using standard PowerShell cmdlets:

Get-WinEvent -Path "C:\Logs\WlanDiagnosticTrace.evtx" | Select-Object TimeCreated, Id, Message -First 10

Disabling Analytic Logs After Troubleshooting

Once diagnostic testing and root-cause analysis are complete, always disable Analytic and Debug logs. Leaving high-frequency diagnostic logs active indefinitely consumes unnecessary CPU cycles and causes minor disk write wear.

To disable the diagnostic log and flush remaining buffered events to disk:

# Disable the channel
wevtutil sl "Microsoft-Windows-WLAN-AutoConfig/Diagnostic" /e:false

# Confirm channel is disabled
(Get-WinEvent -ListLog "Microsoft-Windows-WLAN-AutoConfig/Diagnostic" -Force).IsEnabled

To clear the log buffer and delete accumulated historical events from the channel:

wevtutil cl "Microsoft-Windows-WLAN-AutoConfig/Diagnostic"

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.