Importing format XML
PowerShell, ever since the very beginning, has displayed objects automatically and with nice-looking output. By default, PowerShell displays objects and properties for any object. It creates a table if the object to be displayed contains fewer than five properties, or it creates a list. PowerShell formats each property by calling the .ToString()
method for each property.
You or the cmdlet developer can improve the output by using format XML. Format XML is custom-written XML that you store in a format.ps1XML
file. The format XML file tells PowerShell precisely how to display a particular object type (as a table or a list), which properties to display, what headings to use (for tables), and how to display individual properties.
In Windows PowerShell, Microsoft included several format XML files that you can see in the Windows PowerShell home folder. You can view these by typing Get-ChileItem
$PSHOME/*.format.ps1xml
.
In PowerShell 7, the default format...