UC – PowerShell: Script Block Logging

PowerShell has one of the most powerful logging systems of any shell on any operating system. And almost nobody has Script Block Logging turned on much less even knows it exists.

Many people who do enable script block logging only enable the basic version. There’s a deeper layer that catches stuff the basic one misses. It’s been there since PowerShell 5. It’s one registry key away. And it might be the single highest-value security setting you can flip in your environment today.

In this 3rd Free Upskill Challenge from our PowerShell series by MS MVP, Andrew Pla, you’ll learn what script block logging actually does, how to enable both the basic and deep versions, and how to read what it captures. You don’t need a SIEM. You don’t need fancy tooling. All you need is Event Viewer, a PowerShell window, and about 20 minutes.

Once you understand this, you’ll have real visibility into what’s running on your machines. That’s the foundation for everything else in PowerShell security.

Price = FREE!

Goals for UC – PowerShell: Script Block Logging

By the end of this UC, you should be able to:

  • Explain what it does and why it mattersย – What Event ID 4104 captures and why defenders care about it.
  • Distinguish between basic and deep script block loggingย – Whatย EnableScriptBlockInvocationLoggingย adds and when you’d want it.
  • Enable script block logging via registry and Group Policyย – Both paths, including the PowerShell 7 gotcha most guides skip.
  • Read and interpret script block log eventsย – Find Event ID 4104 in Event Viewer and understand what the fields mean.
  • Recognize suspicious patterns in the logsย – Know what to look for when something shady shows up.

Whatโ€™s an Upskill Challenge (UC)?

A UC is a CTF-style, bite-sized lesson from the JHT Team, our courseware developers as well as โ€œfriendsโ€ of JHT. They are meant to be short and to the point. UCs focus on a single tool or concept and are helpful in quickly providing useful skills that might be prerequisites for other types of educational content on the platform.

A UC should be 10 โ€“ 30 minutes of student time and have no VMs. There are quizzes to make sure that the content is understood.

Prerequisites for UC – PowerShell: Script Block Logging

UCs assume no knowledge at all! Theyโ€™re meant to be completely self-contained, so all of the answers are in the lesson. No outside research is required.


Just Hacking Training (JHT) Logo
Affordable Hands-On Cybersecurity Training from Co-Founder John Hammond & 30+ All-Stars

WMD 6 โ€“ Post-Exploit Tools

Available NOW for Just $120
20% Launch Discount Ends June 30


ContinuumCon Is NEVER Over!

Missed us live? NP. Recordings Free & Workshops Available All Year.


2 Free Community Projects!

- OnlyLANs - Hack an LLM, Win Prizes!
- CrossWind Systems - Vuln Web App


Web App Pentesting - Jr Analyst

Available NOW for Just $100
Don't just hack. Prepare for a career!


AI Cyber Defense Ops

Available Now Only $50


Recent Releases

- Courses: Hardware Hacking 101, WinMalDev 5, SIEMless Threat Hunting, SOC 101, IR 101, Ransomware Analysis
- Bundles: 25% Off Dark Web 1 & 2,
50% Off 7 CTFs, 75% Off 7 HALs
- Free UCs: Encrypt USB Drives, NMEA 2000, 3D Printing, Proxmox, MSF, QEMU, mitmproxy, Maritime Cybersecurity, APIs in PowerShell 7
- Blogs: Brief History of ConDef Ecosystem,ย  ConDef MCP โ€“ Meet Your AI Teaching Asst, Blue Team Training Roadmap


Start Windows Malware Dev

WMD 1 = $40
WMD Intro Path (1-3) = 46% Off


Top Picks

Mishaal Bundle (OSINT), ConDef 2026, API Hacking, Phishing for Red Teams


Courses In Production

Coding for Cybersecurity, Jr Network Pentest, Amass, Hacking Home Lab, MADS Vol 4 and more!