Tools / Event IDs / System Event ID 7045

System Event ID 7045: new service installed

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

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

Event ID 7045 in the System log means a new service was installed. Remote execution tools such as PsExec work by installing a service, and so do many attack frameworks, so this event is one of the most reliable signs of lateral movement on Windows.

The fields that matter

FieldWhat it tells you
Service NameFor example PSEXESVC, or a random string.
Service File NameThe command the service runs. This is the field to read.
Service TypeUser-mode service or kernel driver.
Service Start TypeDemand start, auto start and so on.
Service AccountUsually LocalSystem.

What is normal

Software installs, driver updates and management agents installing their services.

When System Event ID 7045 is suspicious

Common false positive: IT staff use PsExec and remote support tools legitimately. Know who does, from where, and alert on everyone else.

Find System Event ID 7045 with PowerShell

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

Related events

FAQ

What is the difference between 7045 and 4697?

7045 is in the System log and is always written. 4697 is the Security log version and needs "Audit Security System Extension". Both describe the same service install.

How do I see where a remote service install came from?

Look for a type 3 logon (4624) on the same host just before the 7045. Its source address is the machine that pushed the service.