Cmdlet
New-ConsoleFacts
Creates a facts line with bold counts, semantic colours and shared separators.
Syntax
New-ConsoleFacts
[[-Content] <ScriptBlock>]
[[-InputObject] <PSObject>]
[<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Each fact is a value or a record with Value, Label, Caption, Presenter, Role and NewLine. Counts are bold, status words use the same colour, and neutral facts are muted. Facts wrap between items. ASCII uses | instead of the middle dot.
Examples
Example 1
New-ConsoleFacts -Content { @{ Value = 3; Label = 'passed'; Role = 'Pass' }; @{ Value = 1; Label = 'warning'; Role = 'Warn' }; @{ Value = 5; Label = 'checks' } } | Show-ConsoleA report summary
Example 2
$summary = [pscustomobject]@{ Value = 4; Label = 'servers online'; Role = 'Pass' }
$summary | New-ConsoleFacts | Show-ConsoleShow the number of online servers
Parameters
- -Content ScriptBlock
- A script block emitting values or records with Value, Label and an optional Role, Caption, Presenter and NewLine.
- -InputObject PSObject
- Values or fact records, in display order.
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.