Tools / Event IDs / System Event ID 104

System Event ID 104: event log cleared

What System Event ID 104 (event log cleared) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.

Log: System · Severity: High · MITRE ATT&CK T1070.001 · Updated 2026-11-03

System event ID 104 is logged when an event log other than Security is cleared, such as System, Application or PowerShell Operational. Clearing the Security log is 1102. Attackers clear these logs to hide service installs, PowerShell activity and errors.

The fields that matter

FieldWhat it tells you
ChannelWhich log was cleared.
SubjectUserName / SubjectDomainNameWho cleared it.
ProviderMicrosoft-Windows-Eventlog.

What is normal

Rare. Occasionally admins clear a full Application log on a test machine.

When System Event ID 104 is suspicious

Common false positive: Imaging and sysprep processes clear logs on build machines.

Find System Event ID 104 with PowerShell

Get-WinEvent -FilterHashtable @{LogName='System'; Id=104; StartTime=(Get-Date).AddDays(-7)} -MaxEvents 50 |
  ForEach-Object {
    $d = [ordered]@{ Time = $_.TimeCreated; Computer = $_.MachineName }
    ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
    [pscustomobject]$d
  } | Format-List

Microsoft Sentinel (KQL)

Event
| where TimeGenerated > ago(7d) and EventLog == "System" and EventID == 104
| project TimeGenerated, Computer, RenderedDescription, EventData
| order by TimeGenerated desc

Related events

FAQ

How do I keep logs an attacker can't clear?

Forward them to a SIEM or a Windows Event Forwarding collector as they are written; a local clear then doesn't erase the copy.