12.3. Summary

In this chapter, you have learned how to extend both the type system and the object formatting system. While extending those two systems may seem like the blackest of PowerShell magic, doing so can certainly offer significant benefits. Using type extensions, we can create very readable scripts that are a pleasure to extend and maintain. Formatting extensions can help you create the right view that will generate that report you need to produce every day. The possibilities are limitless.

One last word of warning—PowerShell gives us some really powerful tools that can cause chaos if used all the time without proper judgment. It is easy to turn all your utility scripts into extension methods, use them all the time, and forget that ...

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.