24 Enhancing script output presentation

 

Throughout this book, our guiding principle has been to help you create tools that excel in doing one thing and one thing only. These tools remain agnostic to the origins of their input as long as it can be seamlessly channeled to a parameter. Similarly, tools don’t concern themselves with the destination or purpose of their output. Consequently, they don’t focus on creating beautifully formatted output. You can rely on the built-in Format- cmdlets or Select-Object to enhance the aesthetics or cater to management preferences. However, in this chapter, we’ll delve into two advanced techniques for elevating the visual appeal of your output and surpassing the capabilities of Format- commands.

24.1 Our starting point

We’ll start with the following code, which we copied from the end of chapter 17.

24.2 Creating a default view

24.2.1 Exploring Microsoft’s views

24.2.2 Adding a custom type name to output objects

24.2.3 Creating a new view file

24.2.4 Adding the view file to a module

24.3 Your turn

24.3.1 Start here

24.3.2 Your task

24.3.3 Our take

Summary