---
title: "Discussion on \"Getting PowerShell Script Block Logging events with context like who, when, and how  run the code\" | Hashnode"
description: "Discussion on \"Getting PowerShell Script Block Logging events with context like who, when, and how  run the code\". Recently we've enabled the PowerShell Script Block logging security feature in our environment to be able to see what PowerShell commands were run on our computers. But what was my surprise when I found out there is no easy way to get such events wit..."
url: "https://hashnode.com/posts/getting-powershell-script-block-logging-events-with-context-like-who-when-and-how-run-the-code/64dde30868115cd0b550a94e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Getting PowerShell Script Block Logging events with context like who, when, and how run the code](https://doitpshway.com/getting-powershell-script-block-logging-events-with-context-like-who-when-and-how-run-the-code?utm_source=hashnode&utm_medium=feed)

Recently we've enabled the PowerShell Script Block logging security feature in our environment to be able to see what PowerShell commands were run on our computers. But what was my surprise when I found out there is no easy way to get such events wit...

Aug 17, 2023 · 5 min read · doitpshway.com  
Updated Aug 22, 2023  
Read the article

-   [#powershell](https://hashnode.com/tag/powershell)
-   [#logging](https://hashnode.com/tag/logging)
-   [#security](https://hashnode.com/tag/security)

## Written by

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

@AndrewZtrhgf · Czech Republic

  
[View profile](https://hashnode.com/@AndrewZtrhgf)

System Administrator that loves PowerShell

I work as System Administrator for more than 15 years now and I love to make my life easier by automating work &amp; personal stuff via PowerShell (even silly things like food recipes list generation).

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
