PowerShell Genie

PowerShell Security: Logging and AMSI

PowerShell is powerful — and attackers know it.

Script Block Logging

Logs every script block that executes. Enable via GPO. Events: Microsoft-Windows-PowerShell/Operational, Event ID 4104.

Transcription

Start-Transcript -Path transcript.txt
Stop-Transcript

AMSI

Windows 10+ scans PowerShell content through AMSI before execution.

Genie guidePowerShell Security & Script Logging

Harden PowerShell: script block logging, constrained language mode, AMSI, and detecting malicious scripts.

Stuck? Re-read the section, then try the filter yourself.