DESCRIPTION

Generates a format XML for the input type.
Currently, only tables are supported.

Note:
Loading format files has a measureable impact on module import PER FILE.
For the sake of performance, you should only generate a single file for an entire module.

You can generate all items in a single call (which will probably be messy on many types at a time)
Or you can use the -Fragment parameter to create individual fragments, and combine them by passing
those items again to this command (the final time without the -Fragment parameter).

EXAMPLES

EXAMPLE 1

Get-ChildItem | New-PSMDFormatTableDefinition

Generates a format xml for the objects in the current path (files and folders in most cases)

EXAMPLE 2

Creates a format xml that only includes the columns LastWriteTime, FullName

PARAMETERS

-InputObject

The object that will be used to generate the format XML for.
Will not duplicate its work if multiple object of the same type are passed.
Accepts objects generated when using the -Fragment parameter, combining them into a single document.

-ColumnOrderHash

Allows explicitly defining the order of columns on a per-type basis.
These hashtables need to have two properties:

Type: The name of the type it applies to (e.g.: “System.IO.FileInfo”)

Properties: The list of properties in the order they should appear.
Example: @{ Type = “System.IO.FileInfo”; Properties = “Name”, “Length”, “LastWriteTime” }
This parameter takes precedence over ColumnOrder in instances where the
processed typename is explicitly listed in a hashtable.