Wednesday, January 1, 2014

PowerShell Formatting Examples

PowerShell has several formatting options available.  The Format-Wide cmdlet will display a single property in wide format.

powershell_formatting_1

You can use more columns with the –Column parameter.

powershell_formatting_2

The Format-Table cmdlet displays output as a table.

powershell_formatting_3

The –Autosize parameter will attempt to squeeze as much as it can within the display.

powershell_formatting_4

The Format-List cmdlet lists output in a list.

powershell_formatting_5

The Out-GridView cmdlet will create a separate dialog box.  The data can be sorted by clicking on the column heading in question.

powershell_formatting_6

The Format-Custom offers additional options such as Format-Custom –Depth 3.

No comments:

Post a Comment