Register-ConsoleView
Registers how a type is shown by Enable-ConsoleFormatting and Out-ConsoleDefault.
Syntax
Description
Registers how a type is shown by Enable-ConsoleFormatting and Out-ConsoleDefault.
Objects whose type names include -TypeName are shown in the given view when they reach the console. -Property picks the columns as in Format-ConsoleTable (names, calculated properties with Presenter options), -GroupBy groups rows under headings, and types with the same -Group are shown together (files and folders). -Remove deletes a registration. Modules can register their own types when they load.
Examples
EXAMPLE 1
Register-ConsoleView -TypeName @('Name')EXAMPLE 2
Register-ConsoleView -TypeName @('Name') -RemoveParameters
- -Group String
- A group name: consecutive objects of types in the same group are shown in one view.
- -GroupBy Object
- A property name or script block that groups rows under headings.
- -Property Object[]
- The properties, as in Format-ConsoleTable.
- -Title ScriptBlock
- A script block for each object's title ($_ is the object): a shared title heads the view, different titles group the rows.
- -TypeName String[]
- The type names (as in PSObject.TypeNames).
- -View ConsoleViewKind
- The view: Table (default), Cards, Tree, Inspector or Chart.
- Possible values:
Empty,Text,Code,Inspector,Table,Cards,Tree,Chart,Grid - -Remove SwitchParameter
- Removes the registrations instead.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.