Tools / Event IDs / Event ID 5145

Event ID 5145: share object access check

What Event ID 5145 (share object access check) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.

Log: Security · Severity: Informational · MITRE ATT&CK T1021.002 · Updated 2026-11-03

Event ID 5145 is the detailed version of 5140: it records each file or named pipe accessed through a share. That makes it very noisy, and many organisations enable it only on domain controllers and key servers. Where you have it, the Relative Target Name field shows exactly what a remote tool touched, which turns a vague "someone used ADMIN$" into "someone copied PSEXESVC.exe".

The fields that matter

FieldWhat it tells you
Share NameThe share used, such as \\*\ADMIN$ or \\*\IPC$.
Relative Target NameThe file or pipe inside the share. For IPC$ this is the named pipe.
Source Address / Account NameWhere it came from and who did it.
AccessesWhat was requested, for example WriteData (or AddFile).
Access Check ResultsWhether the access was granted.

What is normal

Users reading and writing files on departmental shares, and domain machines reading Group Policy files from SYSVOL.

When Event ID 5145 is suspicious

Common false positive: Endpoint management and backup tools use svcctl and admin shares legitimately. So do domain controllers among themselves.

Find Event ID 5145 with PowerShell

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=5145; 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 == 5145
| project TimeGenerated, Computer, Account, Activity, EventData
| order by TimeGenerated desc

Related events

FAQ

How do I enable Event ID 5145?

Advanced Audit Policy > Object Access > Audit Detailed File Share. Expect a large volume; test it on a few servers and check your log size first.

Why do I see 5145 events for files nobody opened?

Explorer and many programs check access to files and folders while browsing. A check is not the same as reading the file.