PowerShell engine was started. HostName and EngineVersion are key. Logged to the Windows PowerShell log (not Operational).
Downgrade attacks: attackers invoke PowerShell v2 (EngineVersion 2.0) to bypass Script Block Logging (introduced in v5). HostName=ConsoleHost means interactive/command-line. HostName values like 'ServerRemoteHost' indicate WinRM/remote PowerShell.
Alert: EngineVersion=2.0 (PowerShell v2 invocation — bypasses script block logging). Alert: HostName=ServerRemoteHost from unexpected source hosts. Correlate with 4688 parent process.
ScriptBlockTextPathHostApplication | Tactic | Technique |
|---|---|
| Defense Evasion | PowerShell (T1059.001) |
Starting points — adapt the log source, projected fields and thresholds for your environment.
title: PowerShell Version 2 Invocation — Logging Bypass
status: stable
description: PowerShell v2 started — bypasses Script Block Logging
author: theadminstack.com
date: 2026/05/16
logsource:
product: windows
service: powershell-classic
detection:
selection:
EventID: 400
EngineVersion|startswith: '2.'
condition: selection
falsepositives:
- Legacy scripts requiring PowerShell v2
level: high
tags:
- attack.defense_evasion
- attack.execution
- attack.t1059.001
Event
| where EventLog == "Microsoft-Windows-PowerShell/Operational" and EventID == 400 // PowerShell engine started
// EventData holds: ScriptBlockText, Path, HostApplication
| project TimeGenerated, Computer, RenderedDescription
| sort by TimeGenerated desc
index=* sourcetype="WinEventLog:Microsoft-Windows-PowerShell/Operational" EventCode=400
| stats count earliest(_time) as first_seen latest(_time) as last_seen by ComputerName
| sort - count `# PowerShell engine started — add EventData fields: ScriptBlockText, Path, HostApplication`
PowerShell engine started. PowerShell engine was started. HostName and EngineVersion are key. Logged to the Windows PowerShell log (not Operational).
Event 400 is written to the Microsoft-Windows-PowerShell/Operational channel by Microsoft-Windows-PowerShell. Enable PowerShell Module Logging and Script Block Logging via GPO (Administrative Templates → Windows PowerShell).
Event 400 is associated with: PowerShell (T1059.001).
Alert: EngineVersion=2.0 (PowerShell v2 invocation — bypasses script block logging). Alert: HostName=ServerRemoteHost from unexpected source hosts. Correlate with 4688 parent process.