Tools / Event IDs / System Event ID 7040

System Event ID 7040: service start type changed

What System Event ID 7040 (service start type changed) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.

Log: System · Severity: Low · MITRE ATT&CK T1562.001 · Updated 2026-11-08

System Event ID 7040, from the Service Control Manager, records that a service's start type changed, for example from automatic to disabled. Windows does this to its own services all the time, so most 7040s are noise. The ones to catch are security, backup and recovery services being set to disabled, a step most ransomware crews take before encryption so that Defender, the EDR agent and Volume Shadow Copies don't get in the way.

The fields that matter

FieldWhat it tells you
param1 (service name)Display name of the service, such as Microsoft Defender Antivirus Service or Volume Shadow Copy.
param2 / param3Old and new start type: auto start, demand start or disabled.
param4The service key name, such as WinDefend, VSS or wbengine.
System > Security UserIDThe account that made the change. SYSTEM is normal for Windows itself; a user account is worth a look.

What is normal

Background Intelligent Transfer Service (BITS) and Windows Update services flipping between auto start and demand start, driver and software installers, and Group Policy setting service startup.

When System Event ID 7040 is suspicious

Common false positive: Software installers and hardening scripts often disable services such as Print Spooler or Remote Registry on purpose. Keep a list of services your baseline disables.

Find System Event ID 7040 with PowerShell

Get-WinEvent -FilterHashtable @{LogName='System'; Id=7040; 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 == 7040
| project TimeGenerated, Computer, RenderedDescription, EventData
| order by TimeGenerated desc

Related events

FAQ

Why is Event ID 7040 so noisy?

Windows Update and BITS change their own start types routinely. Filter on param4 for the services you care about instead of alerting on every 7040.

Does Event ID 7040 mean the service was stopped?

No, only its start type changed. A stop is logged as 7036. Attackers usually do both, and the service stays off after a reboot.

Which services should I watch for in Event ID 7040?

Defender (WinDefend, WdNisSvc, Sense), your EDR agent, VSS, wbengine, EventLog, backup agents and remote management tools you rely on for response.