PowerShell Formatting System: From Objects to Display Output

PowerShell manages data as in-memory objects, but to present them to users it must convert those objects into readable text or structured output. This is handled by the formatting system. At the end of every pipeline, the hidden cmdlet Out-Default invokes formatting, passing results to Out-Host. If objects are not already formatted, the system applies predefined views or property sets to determine layout. Administrators can override defaults using Format cmdlets such as Format-Table, Format-List, and Format-Wide. Understanding this process allows precise control over how PowerShell displays information.

Out-Default و Out-HostFormat-TableFormat-ListFormat-WideViews و Property Sets

~2 min read • Updated Dec 21, 2025

1. The Time to Format


At the end of every pipeline, Out-Default runs automatically. If objects remain in the pipeline, they are passed to Out-Host. Since Out-Host only understands formatting directives, the formatting system converts objects into those directives, which are then displayed on screen.


2. The Formatting System


  • Predefined Views: XML files (*.format.ps1xml) define how specific object types are displayed.
  • DefaultDisplayPropertySet: A property set that specifies which attributes to show by default.
  • Table vs. List: Four or fewer properties → table; five or more → list, unless overridden.

3. Format Cmdlets


  • Format-Table (ft): Displays data in tabular form. Supports -AutoSize, -Wrap, and -GroupBy.
  • Format-List (fl): Displays all properties or selected ones in list form. Useful for debugging.
  • Format-Wide (fw): Shows multi-column lists based on a single property (usually Name).
  • Format-Custom: Rarely used; shows full breakdown of object properties.

4. Custom Properties in Format-Table


Columns can be customized with:


  • Name/Label: Column header.
  • Expression: Defines column content.
  • FormatString: Applies numeric or date formatting.
  • Align: Left or right alignment.
  • Width: Column width.

5. Notes and Limitations


  • Format-Table with * displays a maximum of 10 properties.
  • Formatting ends the pipeline; once formatted, objects cannot be passed to other cmdlets like ConvertTo-HTML.

Conclusion


PowerShell’s formatting system transforms objects into readable output. By mastering Format cmdlets and understanding views and property sets, administrators can customize displays and produce clear, useful results.


Written & researched by Dr. Shahin Siami