Skip to main content
4103Microsoft-Windows-PowerShell/OperationalApplicationSecurity tier 1

Event ID 4103: Executing Pipeline (Module Logging)

Event ID 4103 fires from PowerShell Module Logging: it records the cmdlet name, who ran it, and the parameters passed, independent of whether Script Block Logging (4104) is enabled. On a host where 4104 was never turned on, 4103 is frequently the only PowerShell telemetry a SOC has at all.

What Triggers Event 4103

Event 4103 is not a Security-log event at all, and that distinction matters before anything else about its content: it lives in the Microsoft-Windows-PowerShell/Operational channel, generated by the PowerShell engine itself rather than the Windows security-auditing subsystem. If your SIEM ingestion is scoped to the Security channel only, as many default configurations are, you are not collecting this event regardless of how your audit policy is configured, a gap worth checking before assuming PowerShell activity is covered.

The event comes from PowerShell's Module Logging feature, and it fires once per pipeline execution, each time a cmdlet, function, script, or external script actually runs. ContextInfo_CommandName records what was invoked, ContextInfo_CommandType records whether that resolved to a Cmdlet, Function, Script, or ExternalScript, and ContextInfo_User records the account under whose session it ran. ContextInfo_HostApplication carries the full command line that launched the PowerShell host process itself, useful context for distinguishing an interactive console session from a script launched by a scheduled task or a remote-execution framework.

Payload is the field that actually carries operational weight: it records the parameter bindings and execution details for the invoked command, which means the argument values passed to whatever ran, not just the command's name. A generic-looking Invoke-WebRequest tells you almost nothing by itself; the same event with a Payload showing a download target and a destination path tells you exactly what happened.

Module Logging's specific value, and the reason this event deserves its own coverage rather than folding into a general PowerShell writeup, is that it operates independently of Script Block Logging, event 4104. A host can have Module Logging enabled and Script Block Logging disabled, in which case 4103 is the only PowerShell telemetry available at all on that host, still naming every cmdlet invoked and every parameter passed, just without the full deobfuscated script text 4104 would otherwise capture. Environments with incomplete PowerShell-logging rollouts, which describes most large environments at some point in their maturity, frequently have exactly this gap: 4103 turned on everywhere, 4104 turned on only in pockets.

That asymmetry cuts the other way too, and it is worth checking explicitly: a host generating 4103 events with no corresponding 4104 for the same session is a visibility gap, not necessarily an attack, but one worth closing, since it means you are seeing command names and arguments without the full script context that would let you distinguish a benign automation script from an obfuscated one using the same handful of cmdlets.

Certain cmdlet and API patterns showing up in the Payload field are worth dedicated matching regardless of everything else: credential-dumping tools invoked from PowerShell, Invoke-WebRequest or .NET download methods fetching remote content, Invoke-Expression executing a string as code, and reflection-based techniques, Add-Type, System.Reflection.Assembly, used to load compiled code directly into the PowerShell process, a common way to bypass Constrained Language Mode restrictions that would otherwise block direct .NET method calls.

Event 4103 Fields

FieldWhat it tells youSimulated value
ContextInfo_HostApplicationThe full command line that launched the PowerShell host, inside the ContextInfo block.C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -File C:\ProgramData\SOCSimulator\inventory.ps1
ContextInfo_CommandNameThe cmdlet, function, or script name that was invoked.Invoke-RestMethod
ContextInfo_CommandTypeWhether CommandName resolved to a Cmdlet, Function, Script, or ExternalScript.Cmdlet
ContextInfo_UserThe account under whose session the pipeline executed.CORP\svc.inventory
PayloadThe parameter bindings and execution details for the invoked command; this is the field that carries what was actually run, including argument values.CommandInvocation(Invoke-RestMethod): "Invoke-RestMethod" ParameterBinding(Invoke-RestMethod): name="Uri"; value="https://inventory.corp.socsimulator.example/api/hosts" ParameterBinding(Invoke-RestMethod): name="Method"; value="Post"

Inspect Event 4103 Values

Click a field to inspect the full simulated value, the way you would expand it in a SIEM event view.

Example Event 4103 Log

A representative Microsoft-Windows-PowerShell/Operational entry for Event 4103, generated deterministically by our telemetry engine so every field holds a realistic, internally consistent value.

Simulated example generated by SOCSimulator Research
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-PowerShell" />
    <EventID>4103</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2025-01-04T20:10:09.000Z" />
    <EventRecordID>760363</EventRecordID>
    <Channel>Microsoft-Windows-PowerShell/Operational</Channel>
    <Computer>WS-SIM-001.corp.socsimulator.example</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="ContextInfo_HostApplication">C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -File C:\ProgramData\SOCSimulator\inventory.ps1</Data>
    <Data Name="ContextInfo_CommandName">Invoke-RestMethod</Data>
    <Data Name="ContextInfo_CommandType">Cmdlet</Data>
    <Data Name="ContextInfo_User">CORP\svc.inventory</Data>
    <Data Name="Payload">CommandInvocation(Invoke-RestMethod): &quot;Invoke-RestMethod&quot;
ParameterBinding(Invoke-RestMethod): name=&quot;Uri&quot;; value=&quot;https://inventory.corp.socsimulator.example/api/hosts&quot;
ParameterBinding(Invoke-RestMethod): name=&quot;Method&quot;; value=&quot;Post&quot;</Data>
  </EventData>
</Event>

Detecting Event 4103

Known offensive cmdlet invoked (credential dumping, downloads, reflective loading)

Lucene is the base filter; match against the CommandName allowlist in your SIEM.

index=wineventlog sourcetype=WinEventLog:Microsoft-Windows-PowerShell/Operational EventCode=4103
| where match(_raw, "(?i)Invoke-Mimikatz|Invoke-WebRequest|DownloadString|Invoke-Expression|Add-MpPreference")
| rex field=_raw "User = (?<ps_user>[^\r\n]+)"
| table _time, host, ps_user, _raw

Module logging present but Script Block Logging (4104) absent for the same session, a visibility gap worth closing

Lucene is the base filter; the cross-channel absence check runs in your SIEM.

index=wineventlog sourcetype=WinEventLog:Microsoft-Windows-PowerShell/Operational EventCode=4103
| stats count by host
| join type=left host [ search index=wineventlog sourcetype=WinEventLog:Microsoft-Windows-PowerShell/Operational EventCode=4104 | stats count as block_events by host ]
| where isnull(block_events)

Constrained Language Mode bypass attempt logged only via 4103 (no 4104 for the same pipeline)

index=wineventlog sourcetype=WinEventLog:Microsoft-Windows-PowerShell/Operational EventCode=4103
| where match(_raw, "(?i)Add-Type|System\.Reflection\.Assembly|\[Ref\]\.Assembly")
| rex field=_raw "User = (?<ps_user>[^\r\n]+)"
| table _time, host, ps_user, _raw

True Positive vs False Positive

PowerShell is one of the most heavily used administrative tools in any Windows environment, and the honest starting point is that most 4103 volume reflects entirely legitimate automation: scheduled maintenance scripts, configuration-management tooling, and administrators doing routine work from an interactive console. Alerting on the event's existence, or even on common cmdlet names in isolation, produces far more noise than signal.

The Payload field's content is where true positives actually separate from the baseline. Matching against a known-offensive cmdlet or pattern list, credential-access tooling, remote-download-and-execute chains, in-memory reflective loading, catches a meaningful share of real activity with a manageable false-positive rate, because these specific patterns have limited legitimate use in routine administration outside of a small, identifiable set of management and deployment tools that should already be allowlisted by host and script path.

The visibility-gap check, hosts emitting 4103 with no matching 4104, is not itself a detection of malicious activity; it is an instrumentation-coverage finding that directly affects how much you should trust the absence of alerts from those hosts. Treat it as an operational finding to remediate, enable Script Block Logging everywhere Module Logging already runs, rather than a security incident, but prioritize remediating it on any host where 4103 has already shown suspicious cmdlet activity, since that is exactly where the missing full-script context would matter most.

Constrained Language Mode bypass attempts, Add-Type and direct assembly-reflection calls, deserve elevated scrutiny specifically on hosts where Constrained Language Mode is supposed to be enforced, typically non-administrative workstations in a locked-down environment. The same calls from an unrestricted administrative workstation, where Full Language Mode is expected and reflection-based scripting is routine for legitimate management tooling, carry much lower signal, which is why this specific check should always be scoped against your actual language-mode deployment rather than applied uniformly.

Context from the surrounding session matters as much as the Payload content itself. A suspicious cmdlet invocation immediately following an unusual logon, arriving via a remote-execution channel, WinRM, a scheduled task created moments earlier, a service freshly installed, or paired with other host-based indicators from the same timeframe should be escalated regardless of how common that specific cmdlet is in isolation. Conversely, the same cmdlet running on a schedule, from a known script path, under a known service account, at the same time every day, is the signature of legitimate automation and a strong candidate for an explicit allowlist entry rather than a recurring alert.

MITRE ATT&CK® Techniques

Event 4103 telemetry feeds detections for these ATT&CK® techniques:

Practice Investigating Event 4103

Reading about executing pipeline (module logging) is one thing. Working the detection inside a live console is another. These free SOCSimulator operations cover the attack techniques Event 4103 helps you detect:

Start investigating free

Frequently Asked Questions

What does event ID 4103 mean?
It means PowerShell Module Logging captured a pipeline execution: which cmdlet or function ran (ContextInfo_CommandName), who ran it (ContextInfo_User), and the parameters passed to it (Payload). It fires per-command, independent of Script Block Logging.
What is the difference between event 4103 and event 4104?
4103 (Module Logging) records which cmdlets ran and their parameters, one event per pipeline execution. 4104 (Script Block Logging) records the full, deobfuscated TEXT of the script block PowerShell compiled, which can span multiple 4104 fragments for a large script. A host can have one enabled without the other; 4103 alone still names the cmdlet, even without the full script text.
Why enable Module Logging (4103) if Script Block Logging (4104) already exists?
Script Block Logging can be evaded by code that never compiles as a distinct block in a way the logger captures, and it was historically absent by default on more hosts than Module Logging. Enabling both closes the gap: 4103 gives the command name and arguments even when 4104 for that exact invocation is missing.

Sources

“PowerShell logging architecture (Module Logging vs Script Block Logging vs Protected Event Logging) and that 4104 is the Script Block Logging event, fetched live this session”

“T1059 Command and Scripting Interpreter is the current MITRE ATT&CK Enterprise technique covering PowerShell abuse, matching the mapping already used for the sibling 4104 entry in this dataset”

Event ID

Event ID 4104: PowerShell Script Block & How to Detect It

Event ID 4104 logs full PowerShell script block text, deobfuscated. SOCSimulator breaks down the fields, GPO setting, an…

Read more
Event ID

Event ID 4688: Process Creation & How to Detect It

Event ID 4688 logs every new process on Windows. SOCSimulator breaks down the fields, the cmdline GPO gap, and detection…

Read more
Glossary

What is EDR? SOC Glossary

EDR (endpoint detection and response) is security software that puts an agent on each laptop, server and workstation, re…

Read more
Glossary

What is Threat Hunting? SOC Glossary

Threat hunting is the proactive search through security telemetry for attackers that existing controls missed. The hunte…

Read more
Glossary

What is SIEM? SOC Glossary

Security Information and Event Management (SIEM) is a platform that aggregates, normalizes, and correlates log data from…

Read more
Career Path

Detection Engineer Career Guide: Salary & Skills

Detection Engineers build the rules, analytics, and automated workflows that determine what the SOC can see. You transla…

Read more
Career Path

SOC Analyst (Tier 2) Career Guide: Salary & Skills

Tier 2 SOC Analysts handle the investigations that Tier 1 escalates. You dig into multi-stage attacks, coordinate contai…

Read more
Technique

Command and Scripting Interpreter (T1059): Detection Training

Because interpreters such as PowerShell, cmd.exe, bash, WMI, and Python ship on every host and are trusted by most contr…

Read more
Comparison

SOCSimulator vs. LetsDefend: Platform Comparison

SOCSimulator wins on operational realism. You get multi-tool shift simulation with SLA pressure, noise injection, and al…

Read more
Event ID

Windows Event ID Library: SOC Reference

Windows Security and Sysmon event IDs with simulated log samples, field tables, and tested detection queries.

Read more
Feature

Shift Mode: Real-Time SOC Simulation

Practice alert triage under realistic time pressure with SLA timers and noise injection.

Read more
Feature

Operations: Guided Training Operations

Structured CTF-style investigation operations covering real-world attack scenarios.

Read more