A format file is a PowerShell XML configuration file that controls how particular object types appear in the console. It supplies display details such as column headers, widths, alignment, views, and selected properties. section 11.2
You can inspect and extend formatting definitions by:
- Finding the object’s complete type name with Get-Member. section 11.2
- Searching an installed .format.ps1xml file for that type and its table view. section 11.2
- Loading custom XML with Update-TypeData. section 11.2
Choose default properties for Uri objects
An XML definition for System.Uri can set the default display properties to Scheme, Host, Port, AbsoluteUri, and IsFile. Save it as Uri.Types.ps1xml, run Update-TypeData -Path /tmp/Uri.Types.ps1xml, and display a URI to see the selected columns. section 11.2
<?xml version="1.0" encoding="utf-8" ?>
<Types>
<Type>
<Name>System.Uri</Name>
<Members>
<MemberSet>
<Name>PSStandardMembers</Name>
<Members>
<PropertySet>
<Name>DefaultDisplayPropertySet</Name>
<ReferencedProperties>
<Name>Scheme</Name>
<Name>Host</Name>
<Name>Port</Name>
<Name>AbsoluteUri</Name>
<Name>IsFile</Name>
</ReferencedProperties>
</PropertySet>
</Members>
</MemberSet>
</Members>
</Type>
</Types>
Inspect the XML structure used to define a type’s default display property set. section 11.2

