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

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1740465042, '18.191.168.65', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/language/object/console-display/views/index(80): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78