Chapter 8. Formatting—and why it’s done on the right

Let’s quickly review: you know that PowerShell cmdlets produce objects, and that those objects often contain more properties than PowerShell shows by default. You know how to use Gm to get a list of all of an object’s properties, and you know how to use Select-Object to specify the properties you want to see. Up to now, you’ve relied on PowerShell’s default configuration and rules to determine how the final output will appear on the screen (or in a file, or in hardcopy form). In this chapter, you’ll learn to override those defaults and create your own formatting for your commands’ output.

8.1. Formatting: making what you see prettier

I don’t want to give you the impression that PowerShell ...

Get Learn Windows PowerShell 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.