Cmdlet
New-ConsoleDiagram
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:
RowsDescription
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-ConsoleA home network.
Example 2
$rows | New-ConsoleDiagram -Title 'Replication' -From Source -To DestinationConnection rows.
Parameters
- -Content ScriptBlock
- Emits typed diagram nodes, links, groups and use cases.
- -Direction DiagramDirection
- The layout direction.
- Possible values:
Right,Down,Left,Up - -From Object
- Source property name or script block; defaults to From.
- -Group Object
- Source group property name or script block; defaults to Group.
- -InputObject PSObject
- Connection rows or an existing diagram.
- -Label Object
- Connection label property name or script block; defaults to Label.
- -MaxPayloadLines Int32
- The maximum visible payload lines.
- -MaxStepLines Int32
- The maximum visible step lines.
- -NoSummary SwitchParameter
- Hides the full-text attention list.
- -ShowDetails Boolean
- Shows focused-node details.
- -ShowKeys SwitchParameter
- Shows keyboard hints.
- -ShowLegend Boolean
- Shows status meanings below the topology.
- -ShowStepPanel Boolean
- Shows use-case steps.
- -Status Object
- Health property name or script block; defaults to Status.
- -Title String
- The diagram title.
- -To Object
- Destination property name or script block; defaults to To.
- -WidgetId String
- 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.