FolderRisk: Caution
WMI C:\Windows\System32\LogFiles\WMI
ETW trace files (.etl) written by Windows AutoLogger sessions (boot traces, diagnostics); binary.
What it’s for
LogFiles\WMI receives the .etl trace files of Event Tracing for Windows (ETW) produced by AutoLogger sessions: trace sessions declared in the registry that start very early at boot and write to an .etl file. Despite the folder name, these are not WMI service logs, which go to C:\Windows\System32\wbem\Logs.
What it contains
- Binary
.etlfiles, usually one per AutoLogger session, for exampleEventLog-Application.etl. - An
RtBackupsubfolder. - The sessions are declared under
HKLM\SYSTEM\CurrentControlSet\Control\WMI\Autologger.
Risks and best practices
- An
.etlbeing written is locked. Copy it or stop the session before reading it. - These traces hold internal diagnostic data: protect copies.
- Do not delete files while live, and do not disable an AutoLogger without knowing what it traces: Windows recreates the files, but you lose traces support may need.
- To save space, disable the unneeded AutoLogger in the registry (
Startvalue set to 0) rather than deleting its file.
Useful commands
# Trace files and their sizeGet-ChildItem -Force "$env:windir\System32\LogFiles\WMI" -Recurse -ErrorAction SilentlyContinue | Select-Object FullName, Length, LastWriteTime
# Active trace sessionslogman query -ets
# AutoLoggers declared in the registryGet-ChildItem "HKLM:\SYSTEM\CurrentControlSet\Control\WMI\Autologger" | Select-Object PSChildName
# Convert a copied trace to readable XMLtracerpt "$env:TEMP\trace.etl" -o "$env:TEMP\trace.xml" -of XML