Chapter 19. Classes in PowerShell

This chapter covers

  • The basic ideas underlying classes in PowerShell
  • PowerShell class and enumeration creation
  • Detailed discussion of properties and methods in PowerShell classes
  • Method overloading and inheritance
  • Class initialization and construction
  • DSC resources based on PowerShell classes

Oh brave new world that has such people in it!

Miranda in William Shakespeare’s The Tempest

PowerShell has always been a .NET language in that it worked with and consumed the types in the .NET framework, but it was always a kind of second-class citizen compared to other .NET languages because you couldn’t create new types directly in PowerShell. This has been fixed in PowerShell v5, which now supports the ability ...

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.