Skip to content
WETNav

LogonTypeDepends on context

4: Batch

Scheduled tasks running under stored credentials.

How to read it

Each run of a scheduled task that uses a stored password produces a Type 4 logon. A new account suddenly logging on as Batch points to a newly created task.

Find it

Get-WinEvent -LogName 'Security' -FilterXPath "*[System[(EventID=4624)]] and *[EventData[Data[@Name='LogonType']='4']]" -MaxEvents 100

About LogonType

LogonType says how a session was created. It is the first field to read on any 4624 or 4625, because the same account means very different things over the console, the network or RDP.

Every LogonType value →

Questions

What does LogonType 4 mean?
Batch. Scheduled tasks running under stored credentials. Each run of a scheduled task that uses a stored password produces a Type 4 logon. A new account suddenly logging on as Batch points to a newly created task.
Is LogonType 4 a sign of an attack?
It depends on the context around it. Confirm it with the surrounding events: who made the request, from where, and what happened next.
Where is LogonType 4 recorded?
In the LogonType field of Windows Security event 4624 (An account was successfully logged on), Windows Security event 4625 (An account failed to log on), Windows Security event 4634 (An account was logged off).
How do I search for LogonType 4?
The queries on this page filter for it in PowerShell, Microsoft Sentinel and the source's own tools. Paste a full record into the WETNav decoder to see every other field explained too.