liveBook · Manning

Format-list

As explained in Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools

Format-List is a PowerShell cmdlet that formats object properties as a vertical list for display.

Format-List is a PowerShell formatting cmdlet that displays object properties vertically. Piping command results to `fl *` exposes the complete, unadulterated property set instead of the abbreviated default display. section 9.2

Use the list view while developing automation: inspect which properties exist, what they contain, and whether their values vary between computers. This helps turn assumptions about command output into reliable script decisions. section 9.2

Inspect all computer-system properties

`Get-CimInstance -ClassName Win32_ComputerSystem | Format-List *` displays every available property vertically, making the returned object easier to examine before selecting values for a script. section 9.2

PowerShell can also select a list-type view for an object type. Such views define the property names shown in each list entry, while formatting remains separate from the command that produces the objects. section 24.1 section 24.2.1

How Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools covers it

How deep it goes
Explains full-property inspection and list-view selection, but stops short of detailing the complete formatting system.
Examples
Uses Get-CimInstance output, `fl *`, a disk-information function, and XML list-view definitions.
What it assumes
Assumes familiarity with PowerShell commands and object properties while reinforcing how to inspect their actual returned values.
What you can do after
Diagnose automation assumptions by inspecting every returned property before choosing values for scripts.
How it connects
Connects PowerShell objects, object properties, formatting views, and command output presentation.

Also explained in

Compare how 2 books explain format-list →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools. The section links point to the parts of the book it draws on.