Search notes:

PowerShell: Formatting views

View types

There are four fundamental view types:
Table view Each record corresponds to one object, each column displays a property (member) of this object
List view A «two column» display where each row corresponds to one PowerShell: object members[property (member). The left column displays the property name or a label, the right column its value.
Wide view Only one property is displayed in one or more columns. A wide view has no header.
Custom view Displays objects and their properties in a customizable manner.

View name

Each view is identified by a name.
In a formatting file (*.format.ps1xml), the name is indicated like so:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration><ViewDefinitions>

   <View><Name>name for the view</Name>

     …

   </View>
  
</ViewDefinitions></Configuration>

Object that is identified by the view

The .NET object that is configured by the view is specified with the <TypeName> within a <ViewSelectedBy> tag: It's possible to list multiple <TypeName>:
…
  <View>
    <Name>…</Name>
    <ViewSelectedBy>
      <TypeName>…</TypeName>
      <TypeName>…</TypeName>
    </ViewSelectedBy>
  …  

See also

Displaying objects in the console

Index