Skip to content
Sign In

win:powershell 4104

Script block logging (script block text)

Microsoft-Windows-PowerShell/Operational: records the text of script blocks as they are processed, including de-obfuscated content; long scripts are split across several events.

Log source
PowerShell logging
Host type
Windows (workstation, member server, domain controller)
How to enable
Turn on PowerShell Script Block Logging (GPO: Windows Components > Windows PowerShell; HKLM\Software\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging EnableScriptBlockLogging=1). PowerShell 7 logs to PowerShellCore/Operational.
Tier, host type
Minimum
Techniques
56
Rules depending on it
Splunk 122, Sigma 181, Elastic 14

Why this tier

CISA/ASD; DISA STIG (server); DISA STIG (workstation); NSA

By role

RoleTierBasis
Windows workstationMinimumCISA/ASD; DISA STIG (workstation); NSA
Windows member serverMinimumCISA/ASD; DISA STIG (server); NSA
Windows domain controllerMinimumCISA/ASD; DISA STIG (server); NSA
Windows web server (IIS), internet-facingMinimumCISA/ASD; DISA STIG (server); NSA

Techniques it helps detect

Rules that depend on it

Splunk 122
Sigma 181
Elastic 14

Standards and guidance naming it

RequirementRelationBasis
OMB M-26-14: Attack vectors and lateral movementAppendix B item 5(10)Supports an activityour analysis: remoting and script content
ASD ACSC / CISA et al.: PowerShell loggingBest Practices for Event Logging and Threat Detection (Aug 2024)Names this eventquoted: script block logging
DISA STIG: Advanced audit policy requirementsMicrosoft Windows 11 V2R11 (2026-10-05)Names this eventWN11-CC-000326 (workstation): PowerShell Script Block Logging Policy
DISA STIG: Advanced audit policy requirementsMicrosoft Windows Server 2022 V2R11Names this eventWN22-CC-000460 (server): PowerShell Script Block Logging Policy
DISA STIG: Advanced audit policy requirementsMicrosoft Windows 10 V3R6 (2026-01-23)Names this eventWN10-CC-000326 (workstation): PowerShell Script Block Logging Policy
DISA STIG: Advanced audit policy requirementsMicrosoft Windows Server 2019 V3R9 (2026-07-10)Names this eventWN19-CC-000460 (server): PowerShell Script Block Logging Policy
DISA STIG: Advanced audit policy requirementsMicrosoft Windows Server 2025 V1R1 (2026-02-27)Names this eventWN25-CC-000460 (server): PowerShell Script Block Logging Policy
NSA: Recommended Windows events to forwardEvent Forwarding Guidance (RecommendedEvents.csv)Names this eventPowerShell Activities: Exception Raised

EDR events that stand in for it

Full: the sensor event carries what this event carries. Partial: the sensor reports a subset, so it does not replace the event.

ProductSensor eventFidelityBasis
CrowdStrike Falcon sensor telemetry (FDR event_simpleName)ScriptControlScanTelemetryPartialpySigma-backend-crowdstrike: ps_script -> CommandHistory, ScriptControlScanTelemetry; only AMSI-scanned content and interactive command history, not every script block
CrowdStrike Falcon sensor telemetry (FDR event_simpleName)CommandHistoryPartialpySigma-backend-crowdstrike: ps_script -> CommandHistory, ScriptControlScanTelemetry; only AMSI-scanned content and interactive command history, not every script block
Microsoft Defender for Endpoint device tablesDeviceEventsPartialour analysis: PowerShellCommand ActionType (command names only) and AmsiScriptContent (scanned content) in DeviceEvents, both named in Sentinel rules; script block text is not reproduced in full

Dataset version 0.5.3, built 2026-11-08, from public sources only. Vendor rule names, requirement text and ATT&CK content are reproduced as published; the links between them are the authors' analysis. See the references for each source, its version and its license.