Skip to content

Out-SpectreHost

Description

Out-SpectreHost writes a spectre renderable object to the console host.
This function is used to output spectre renderables to the console when you want to avoid the additional newlines that the PowerShell formatter adds.


Examples

Example 1
This example demonstrates how to write a spectre renderable object to the console host.

$table = Get-ChildItem | Select-Object Name, Length, LastWriteTime | Format-SpectreTable
$table | Out-SpectreHost

Parameters

Data

The data to write to the console.

TypeRequiredPositionPipelineInput
[Object]true1true (ByValue)

CustomItemFormatter

The default host customitem formatter has some restrictions, it needs to be one char less wide than when outputting to the standard console or it will wrap.

TypeRequiredPositionPipelineInput
[Switch]falsenamedfalse

Syntax

Out-SpectreHost [-Data] <Object> [-CustomItemFormatter] [<CommonParameters>]