Chapter 17. Working with .NET and events

This chapter covers

  • .NET and PowerShell
  • Real-time events

I love it when a plan comes together!

Col. John “Hannibal” Smith, The A-Team

The good news is that PowerShell is .NET -based and works with .NET objects. The not-quite-so-good news is that not all of .NET is immediately available when you open PowerShell. Some .NET functionality is available through cmdlets—for the rest you need to access the .NET classes in your code. PowerShell doesn’t load the entire .NET framework, so you’ll need to load assemblies before you can use them. Once an assembly is loaded, you have access to the rich .NET functionality, including creating graphical applications in PowerShell.

Note

PowerShell v6 uses ...

Get Windows PowerShell in Action, Third Edition 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.