7.6. Using the update-formatdata and update-typedata Cmdlets
PowerShell version 1.0 format files have the file extension .ps1xml. I described earlier in this chapter a little of the structure of a format file and mentioned that the formatting information used by the default formatter is contained in the powershellcore.format.ps1xml file. The file contains many XML elements but also contains a digital signature. You may want to have other format files available for use. The update-formatdata cmdlet is intended to allow you to load other ps1xml files into the Windows PowerShell shell.
The update-formatdata cmdlet supports the following parameters, in addition to the common parameters:
appendPath — Specifies a path to optional format files that are processed after the built-in format files are loaded
prependPath — Specifies a path to optional format files that are processed before the built-in format files are loaded
The update-typedata cmdlet is similar in concept to the update-formatdata cmdlet. Formatting data for types is held in the types.ps1xml file. The update-typedata cmdlet allows you to load additional files containing format data for the display of types.
The update-typedata cmdlet supports the following parameters, in addition to the common parameters:
appendPath — Specifies a path to optional type.ps1xml files that are processed after the built-in files are loaded
prependPath — Specifies a path to optional type.ps1xml files that are processed before the built-in files ...
Get Professional Windows® PowerShell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.