22.8. Summary

Handling events from .NET objects is not the primary usage scenario for PowerShell, which could explain why the samples we saw in this chapter look complex and feel like ugly hacks. Being able to use and create similar solutions requires knowledge about the .NET Framework and WMI, and a programmer or a system administrator will either have that knowledge or will greatly benefit from acquiring it. There is great value in being able to work reliably with events from within scripts, and having a tool like PSEventing under your belt can really help you solve an otherwise unsolvable scripting problem.

Get Pro Windows PowerShell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.