Chapter 17. Creating a custom type extension

 

A few chapters back, we showed you how to create a custom formatting view for your tools’ output. In this chapter, we’re going to do something very similar by creating a type extension. Unlike views, which only affect the visual presentation of your output, a type extension can actually add functionality to objects you write to the pipeline.

17.1. The anatomy of an extension

Believe it or not, you’ve already seen type extensions in action. For example, run Get-Process | Get-Member, and look at the output:

17.2. Creating a script property

 
 

17.3. Creating a script method

 
 

17.4. Loading the extension

 
 
 
 

17.5. Testing the extension

 
 
 
 

17.6. Adding the extension to a manifest

 
 
 

17.7. Lab

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage