Tools / Event IDs / Event ID 4800

Event ID 4800: workstation locked

What Event ID 4800 (workstation locked) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.

Log: Security · Severity: Informational · Updated 2026-11-03

Event ID 4800 records the workstation being locked. It isn't a security alert, but in an investigation it helps show when the user was at the machine and when they weren't, which matters when something ran while the screen was locked.

The fields that matter

FieldWhat it tells you
Subject > Account NameThe user.
Session IDThe session that was locked.

What is normal

Users locking their screen during the day, and automatic locks after inactivity.

When Event ID 4800 is suspicious

Common false positive: Screen locks from inactivity are entirely normal; use 4800 only for timelines.

Find Event ID 4800 with PowerShell

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

Related events

FAQ

Which audit setting logs 4800?

Audit Other Logon/Logoff Events, which is off by default.