Chapter 27. Custom type extensions

This chapter covers

  • Using PowerShell’s Extensible Type System
  • Creating custom type extensions
  • Importing custom type extensions
  • Creating custom type extensions dynamically

Windows PowerShell includes an Extensible Type System (ETS). A type, in Power-Shell’s world, is a data structure that describes what a type of data looks like, as well as what capabilities that type of data has. For example, there’s a type that represents a Windows service. The type says that a service has a name, a description, a status, and other properties. The type also says that a service has methods enabling you to stop the service, start it, pause it, resume it, and so on.

Types are generally born within the .NET Framework that ...

Get PowerShell in Depth now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.