O'Reilly logo

PowerCLI Cookbook by Philip Sellers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Basics of formatting output from PowerShell objects

Anything that exists in a PowerShell object can be output as a report, e-mail, or editable file. Formatting the output is a simple task in PowerShell and to some extent you've already been doing some basic formatting in prior recipes. Sometimes, the information you receive in the object is in a long decimal number format, but to make it more readable, you want to truncate the output to just a couple decimal places. You did this in the Manipulating the list of snapshots to get better information recipe in Chapter 5, Creating and Managing Snapshots, with formatting numbers.

In this recipe, you will take a look at the Format-Table, Format-Wide, and Format-List cmdlets. You will dig into the Format-Custom ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required