Chapter 20. Using object hierarchies for complex output

Way back in chapter 7, we showed you how to create custom objects to use as the output of your functions. To this point, the objects you’ve created have essentially been flat, meaning they could be easily represented in a flat data file structure such as a CSV file or in an Excel spreadsheet or in a simple table. That’s because your objects, to this point, have represented only a single entity, such as a computer system. In this chapter, we’re going to show you how to work with more complex objects that include multiple entities in a single, hierarchical object.

20.1. When a hierarchy might be necessary

Typically, a single object should represent one single kind of thing. That might be ...

Get Learn PowerShell Toolmaking in a Month of Lunches 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.