Tools / Event IDs / Event ID 4697

Event ID 4697: service installed

What Event ID 4697 (service installed) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.

Log: Security · Severity: Medium · MITRE ATT&CK T1543.003 · Updated 2026-11-03

Event ID 4697 is the Security log's record of a new service. System Event ID 7045 records the same thing and is always on; 4697 appears only when the "Audit Security System Extension" subcategory is enabled, but it adds who installed the service and lands in the log your SIEM probably already collects. Remote execution tools such as PsExec, Impacket and Cobalt Strike all work by installing a service, so this is one of the most reliable lateral movement signals Windows gives you.

The fields that matter

FieldWhat it tells you
Subject > Account NameWho installed the service. A user account here, rather than SYSTEM or an installer, deserves a look.
Service NameThe name it was registered under. PSEXESVC is PsExec; random strings of 7 or 8 letters are typical of attack frameworks.
Service File NameWhat the service runs. This is the field that decides most cases.
Service Start Type2 is automatic (persistence), 3 is on demand (often run once and deleted).
Service AccountUsually LocalSystem, which is exactly why attackers like services.

What is normal

Software installers, Windows updates, driver installs and management agents. They run from Program Files or System32, have readable names and turn up during patch windows.

When Event ID 4697 is suspicious

Common false positive: IT teams use PsExec and RMM tools for legitimate work. Check the account and whether a ticket exists before escalating, and keep a list of the tools your admins actually use.

Find Event ID 4697 with PowerShell

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4697; 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)

SecurityEvent
| where TimeGenerated > ago(7d) and EventID == 4697
| project TimeGenerated, Computer, Account, Activity, EventData
| order by TimeGenerated desc

Related events

FAQ

What is the difference between Event ID 4697 and 7045?

Both record a new service. 7045 is in the System log and is written by default; 4697 is in the Security log, needs an audit subcategory turned on, and includes the account that installed it. Collect both if you can.

How do I enable Event ID 4697?

Advanced Audit Policy > System > Audit Security System Extension, Success. In a GPO that is under Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration.