Skip to content
ConsoleMonster
Cmdlet

New-ConsoleDiagram

Module
ConsoleMonster
Inputs
System.Management.Automation.PSObject
Outputs
ConsoleMonster.Widgets.Diagram

Builds a diagram from a script block or connection rows.

Syntax

New-ConsoleDiagram
[[-Content] <ScriptBlock>]
[-Direction <Right|Down|Left|Up>]
[-From <Object>]
[-Group <Object>]
[-InputObject <PSObject>]
[-Label <Object>]
[-MaxPayloadLines <Int32>]
[-MaxStepLines <Int32>]
[-NoSummary]
[-ShowDetails <Boolean>]
[-ShowKeys]
[-ShowLegend <Boolean>]
[-ShowStepPanel <Boolean>]
[-Status <Object>]
[-Title <String>]
[-To <Object>]
[-WidgetId <String>]
[<CommonParameters>]
#
Parameter set: Rows

Description

Emit New-ConsoleDiagramNode, Link, Group and UseCase objects in Content. A node's label is its id unless Id is given. Pipeline rows use From, To, Label, Status and Group; selectors accept property names or script blocks using $_. Connections create undeclared endpoints. Graphics is optional for C#; the module includes it and registers its renderer.

Examples

Example 1

New-ConsoleDiagram -Title 'Home' { New-ConsoleDiagramNode Laptop -To Router; New-ConsoleDiagramNode Router -Kind Gateway } | Show-Console

A home network.

Example 2

$rows | New-ConsoleDiagram -Title 'Replication' -From Source -To Destination

Connection rows.

Parameters

-Content ScriptBlock optionalposition: 0
Emits typed diagram nodes, links, groups and use cases.
-Direction DiagramDirection optional
The layout direction.
Possible values: Right, Down, Left, Up
-From Object optional
Source property name or script block; defaults to From.
-Group Object optional
Source group property name or script block; defaults to Group.
-InputObject PSObject optionalpipeline: True (ByValue)
Connection rows or an existing diagram.
-Label Object optional
Connection label property name or script block; defaults to Label.
-MaxPayloadLines Int32 optional
The maximum visible payload lines.
-MaxStepLines Int32 optional
The maximum visible step lines.
-NoSummary SwitchParameter optional
Hides the full-text attention list.
-ShowDetails Boolean optional
Shows focused-node details.
-ShowKeys SwitchParameter optional
Shows keyboard hints.
-ShowLegend Boolean optional
Shows status meanings below the topology.
-ShowStepPanel Boolean optional
Shows use-case steps.
-Status Object optional
Health property name or script block; defaults to Status.
-Title String optional
The diagram title.
-To Object optional
Destination property name or script block; defaults to To.
-WidgetId String optional
The identifier addressed by Update-Console.

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.