Tools / Event IDs / Defender Event ID 5007

Defender Event ID 5007: defender configuration changed

What Defender Event ID 5007 (defender configuration changed) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.

Log: Microsoft-Windows-Windows Defender/Operational · Severity: Medium · MITRE ATT&CK T1562.001 · Updated 2026-11-08

Microsoft Defender Event ID 5007 says the antimalware platform configuration changed, with the old and new value of the setting. Most of these are Defender updating itself or a policy arriving from Intune or Group Policy. The ones that matter are new exclusions and protection features being switched off, because adding an exclusion for a folder is the quiet way to make Defender ignore a payload instead of disabling it outright.

The fields that matter

FieldWhat it tells you
Old ValueThe registry path and previous value of the setting, or empty if it is new.
New ValueThe path and new value, for example HKLM\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths\C:\Users\Public = 0x0.
Product VersionThe Defender platform version, useful when a change follows an update.

What is normal

Signature and platform updates, Intune or Group Policy settings arriving (paths under SOFTWARE\Policies\Microsoft\Windows Defender), and exclusions documented for backup, database or line-of-business software.

When Defender Event ID 5007 is suspicious

Common false positive: Vendor-recommended exclusions for SQL Server, Exchange or backup software. Record them in your policy so a new local exclusion stands out.

Find Defender Event ID 5007 with PowerShell

Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Windows Defender/Operational'; Id=5007; 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 == "Microsoft-Windows-Windows Defender/Operational" and EventID == 5007
| project TimeGenerated, Computer, RenderedDescription, EventData
| order by TimeGenerated desc

Related events

FAQ

How do I see which Defender exclusions are set?

Run Get-MpPreference | Select-Object Exclusion* as an administrator. If exclusions are hidden from local admins by policy, check the policy in Intune or Group Policy instead.

What is the difference between Event ID 5007 and 5001?

5001 says real-time protection was turned off. 5007 records any configuration change, including the quieter ones such as exclusions, so it catches more.

Can tamper protection stop these changes?

Tamper protection blocks local changes to many protection settings, but exclusions added by an administrator can still be allowed depending on configuration. Watching 5007 covers the gap.