Skip to content
WETNav
SystemService Control

Event ID 7040: Service start type was changed

Written when the start type of an existing service is changed, for example from disabled to automatic.

Channel
System
Logged by default
Yes
Written on
Any host
Volume
Low
Provider
Service Control Manager
Needs a SACL
No

Key fields

Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.

param1Display name of the service whose start type changed
param2Previous start type (e.g. disabled, demand start)
param3New start type (e.g. auto start)
param4Short service (registry) name
Have one of these events? Paste it into the decoder

Analyst notes

  • 01Re-enabling a service that was disabled for hardening (for example enabling the Remote Registry or WebClient service) is a common pre-attack step.
  • 02Setting a security or update service to 'disabled' is a defense-evasion signal; pair with 7036 'stopped' for the same service.
  • 03Group Policy and legitimate admin tooling change start types routinely; check param4 against the services an attacker would want.

Pull this event

Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.

Get-WinEvent -LogName 'System' -FilterXPath "*[System[(EventID=7040)]]" -MaxEvents 50 |
  Select-Object TimeCreated, Id, MachineName, Message

-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.

Where it shows up

Investigations, attack signals and lateral movement techniques that rely on this event.

ATT&CK mapping

Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.

Also relevant, depending on field values

Common questions

What does Windows event ID 7040 mean?
Written when the start type of an existing service is changed, for example from disabled to automatic. It is written to the System log (System).
Is event 7040 logged by default?
Yes, a default Windows installation records it.
Where is event 7040 recorded?
In the System channel on the any host.

Written when the start type of an existing service is changed, for example from disabled to automatic. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.