liveBook · Manning

Format-list

As explained in Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

Format-List is a PowerShell cmdlet that displays selected properties and their values for objects in a list-oriented layout.

Format-List displays selected object properties and their values vertically, making it useful when a table is too wide. Use its alias, fl, for quick inspection. section 11.4

Inspect every property

Run Get-Verb | Fl * to display each verb's properties and values as separate list entries. Format-List can also expose detailed job information: Get-Job -Id 1 | Format-List *. section 11.4 section 14.7

Use Format-List to:

  • Select properties with -Property when only particular values should be displayed. section 11.4
  • Discover an object's available properties while seeing the values those properties contain. section 11.4
  • Create custom list entries with hash tables, including renamed labels and calculated values. section 11.6
  • Format received background-job results, including deserialized objects. section 14.7

Show a calculated value

Get-Process | Format-Table Name, @{name='VM(MB)';expression={$_.VM / 1MB -as [int]}} creates a readable calculated memory value; the same hash-table approach can create custom list entries. section 11.6 section 11.11

Get-Verb | Fl *
...
Verb        : Remove
AliasPrefix : r
Group       : Common
Description : Deletes a resource from a container
 
Verb        : Rename
AliasPrefix : rn
Group       : Common
Description : Changes the name of a resource
 
Verb        : Reset
AliasPrefix : rs
Group       : Common
Description : Sets a resource back to its original state
 
Verb        : Resize
AliasPrefix : rz
Group       : Common
Description : Changes the size of a resource
 
Verb        : Search
AliasPrefix : sr
Group       : Common
Description : Creates a reference to a resource in a container
 
Verb        : Select
AliasPrefix : sc
Group       : Common
Description : Locates a resource in a container
...

Browse the formatted Get-Verb output to see how each object becomes a readable group of property-value entries. section 11.4

How Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS covers it

How deep it goes
Explains aliases, property selection, discovery, and calculated entries, but does not descend into formatting internals.
Examples
Uses Get-Verb, Get-Process, Get-Job, Azure storage objects, and calculated memory properties as formatting examples.
What it assumes
Assumes basic PowerShell pipelines, objects, and cmdlet use while teaching property values and hash-table expressions through examples.
What you can do after
Apply it via PowerShell pipelines to inspect objects, select displayed properties, and produce readable calculated output.
How it connects
Connects Format-List with PowerShell objects, pipelines, Format-Table, Get-Member, and background jobs.

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 in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS. The section links point to the parts of the book it draws on.