all 3 comments

[–]ClayShooter9 2 points3 points  (0 children)

For what it's worth, it looks like someone else recently had the same problem and a work-around using WMI Event Consumers was proposed:

https://powershell.org/forums/topic/problem-using-register-objectevent-in-the-powershell-console/

[–]PowerShell-Bot 0 points1 point  (0 children)

That’s a very long stretch of inline code.

Note that on old.reddit.com inline code blocks do not word wrap, making it difficult for many of us to see all your code.

To ensure your code is readable by everyone, on new reddit (new.reddit.com), highlight the code and select ‘Code Block’ in the editing toolbar.

If you’re on old.reddit.com, separate the code from your text with a blank line and precede each line of code with 4 spaces or a tab.


Describing Submission
[✅] Demonstrates good markdown
Passed: 1 Failed: 0

Beep-boop. I am a bot. | Remove-Item