PowerShell is the most-abused legitimate tool in modern attacks. The default logging configuration captures almost nothing useful. Here is the practitioner guide to enabling deep PowerShell visibility without breaking operations.
PowerShell is the single most-abused legitimate administrative tool in modern attacks against Texas SMBs. Roughly 70% of post-exploitation activity in 2026 incident response engagements involves PowerShell — for lateral movement, credential dumping, persistence, payload staging, and exfiltration. The reason: PowerShell is signed Microsoft software, present on every Windows endpoint, and rarely blocked by EDR or PAM unless explicitly configured.
The default logging configuration captures almost nothing useful for incident investigation. This guide walks through the four logging layers Texas IT teams should enable, the EDR/Sentinel detection rules that pay off immediately, and Constrained Language Mode as the defensive endgame for high-security environments.
Out of the box, Windows logs PowerShell process starts (Event ID 4688 if process auditing is on) but does NOT log: the actual commands run, the script content executed, the modules loaded, or the remote sessions opened. An attacker running Invoke-Mimikatz | Out-String generates the same default log entry as a legitimate admin running Get-Service — both show "powershell.exe started by user X."
This means default-configured Windows environments are blind to the most prevalent attack technique in modern intrusions. Closing this gap is the single highest-leverage detection improvement most Texas IT teams can make.
Logs each PowerShell module member as it executes, including parameters and output objects. Useful for tracking which cmdlets ran but does not capture the script body.
Enable via Group Policy: Computer Configuration → Administrative Templates → Windows Components → Windows PowerShell → "Turn on Module Logging" → Enabled. Module Names: *
Logs the full deobfuscated script text as it is executed — including Base64-decoded payloads, encoded commands, and dynamically constructed strings. This is the single most valuable PowerShell log source. Captures everything an attacker actually runs, defeating most obfuscation.
Enable via Group Policy: Same path → "Turn on PowerShell Script Block Logging" → Enabled.
Captures the full PowerShell session as a plain-text transcript on disk for every console session. Useful for forensics and compliance evidence — provides a human-readable record of exactly what was typed and what came back.
Enable via Group Policy: Same path → "Turn on PowerShell Transcription" → Enabled. Output directory: a write-once-only path the local user cannot modify (e.g., a network share with append-only permissions).
For PowerShell remoting (PSRemoting / WinRM), enables transcription of the remote session at the endpoint. Captures lateral movement that doesn't touch the local console.
PowerShell 5.1 (Windows-built-in) supports all four logging layers. PowerShell 7+ (cross-platform, separate install) requires explicit configuration to honor the same Group Policy settings. Many environments have PowerShell 7 installed alongside but unconfigured — attackers can downgrade to PowerShell 2.0 (still present on many systems) or call PowerShell 7 directly to bypass logging.
Mitigations:
With Module + Script Block logging enabled and forwarded to your SIEM (Microsoft Sentinel — see our Sentinel deployment guide — or third-party), the following detection rules consistently catch real-world malicious activity:
powershell.exe -EncodedCommand usage outside known administrative scripts. Attackers Base64-encode payloads to hide intent from naive log reviewSystem.Reflection, Add-Type, or [Reflection.Assembly] in user-context PowerShellRegister-WmiEvent or New-CimInstance with subscriptionInvoke-WebRequest or Net.WebClient.DownloadString targeting non-Microsoft / non-approved CDNsSet-MpPreference -DisableRealtimeMonitoring-ExecutionPolicy Bypass usage outside known administrative scriptsConstrained Language Mode is the PowerShell equivalent of "default deny" — it restricts PowerShell to a safe subset of language features (no .NET reflection, no COM object creation, no Add-Type compilation). Attackers cannot run most offensive PowerShell tooling under CLM because the underlying primitives are blocked.
CLM is enforced via two paths:
For Texas SMBs that have deployed PAM, layering CLM enforcement on top is a meaningful additional barrier against PowerShell-based attacks at minimal operational cost.
For Texas IT teams without comprehensive PowerShell logging: enable Module Logging + Script Block Logging via Group Policy in your standard endpoint baseline. The configuration takes 30 minutes; the visibility improvement is dramatic. Then forward Event ID 4103 + 4104 to your SIEM and enable the encoded-commands detection rule. Iterate on additional detection rules as your environment normalizes.
Related reading: Active Directory tiering, ITDR for Texas SMBs, cybersecurity services.
LayerLogix provides expert cybersecurity solutions for businesses across Houston and nationwide.
Let our team help your Houston business with enterprise-grade IT services and cybersecurity solutions.