Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

Stars 1,019
Forks 115
Open issues 54
PowerShell Gallery downloads 7,576,901
Release v1.41.0
Language: PowerShell Updated: 2026-10-03
Command

New-DiagramLink

Module PSWriteHTML

Creates a new diagram link between two nodes.

Syntax

Description

Creates a new diagram link connecting two nodes in a visual representation.

Examples

Authored help example

EXAMPLE 1

An example of creating a new diagram link.

Parameters

-ArrowsFromEnabled SwitchParameter optional
Switch parameter to enable arrows at the start of the link.
-ArrowsFromScaleFactor Nullable`1 optionalposition: 7
Specifies the scale factor for the arrows at the start of the link.
-ArrowsFromType String optionalposition: 8
Specifies the type of arrows at the start of the link. Valid values are 'arrow', 'bar', or 'circle'.
Possible values: arrow, bar, circle
-ArrowsMiddleEnabled SwitchParameter optional
Switch parameter to enable arrows in the middle of the link.
-ArrowsMiddleScaleFactor Nullable`1 optionalposition: 5
Specifies the scale factor for the arrows in the middle of the link.
-ArrowsMiddleType String optionalposition: 6
Specifies the type of arrows in the middle of the link. Valid values are 'arrow', 'bar', or 'circle'.
Possible values: arrow, bar, circle
-ArrowsToEnabled SwitchParameter optional
Switch parameter to enable arrows at the end of the link.
-ArrowsToScaleFacto Nullable`1 optionalposition: 3
-ArrowsToType String optionalposition: 4
Specifies the type of arrows at the end of the link. Valid values are 'arrow', 'bar', or 'circle'.
Possible values: arrow, bar, circle
-ArrowStrikethrough SwitchParameter optional
Switch parameter to enable a strikethrough effect for the link.
-Chosen SwitchParameter optional
Switch parameter to mark the link as chosen.
-Color String optionalposition: 9
Specifies the color of the link.
-ColorHighlight String optionalposition: 10
Specifies the highlight color of the link.
-ColorHover String optionalposition: 11
Specifies the hover color of the link.
-ColorInherit String optionalposition: 12
Specifies how the link color should inherit. Valid values are 'true', 'false', 'from', 'to', or 'both'.
Possible values: true, false, from, to, both
-ColorOpacity Nullable`1 optionalposition: 13
Specifies the opacity of the link color. Range between 0 and 1.
-Dashes SwitchParameter optional
Switch parameter to enable dashed line style for the link.
-FontAlign String optionalposition: 21
Possible options: 'horizontal','top','middle','bottom'. The alignment determines how the label is aligned over the edge. The default value horizontal aligns the label horizontally, regardless of the orientation of the edge. When an option other than horizontal is chosen, the label will align itself according to the edge.
Possible values: horizontal, top, middle, bottom
-FontBackground String optionalposition: 18
Specifies the background color for the font.
-FontColor String optionalposition: 15
Specifies the font color for the label.
-FontMulti String optionalposition: 22
Specifies whether the label supports multiple lines or markdown/html formatting.
Possible values: false, true, markdown, html
-FontName String optionalposition: 17
Specifies the font name for the label.
-FontSize Object optionalposition: 16
Specifies the font size for the label.
-FontStrokeColor String optionalposition: 20
Specifies the stroke color for the font.
-FontStrokeWidth Object optionalposition: 19
Specifies the stroke width for the font. (in pixels)
-FontVAdjust Nullable`1 optionalposition: 23
Specifies the vertical adjustment for the label.
-From String[] optionalposition: 0
Specifies the starting node of the link.
-Label String optionalposition: 2
Specifies the label text for the link.
-Length String optionalposition: 14
Specifies the length of the link.
-SmoothForceDirection String optionalposition: 26
Accepted options: ['horizontal', 'vertical', 'none']. This options is only used with the cubicBezier curves. When true, horizontal is chosen, when false, the direction that is larger (x distance between nodes vs y distance between nodes) is used. If the x distance is larger, horizontal. This is ment to be used with hierarchical layouts.
Possible values: horizontal, vertical
-SmoothRoundness String optionalposition: 27
Accepted range: 0 .. 1.0. This parameter tweaks the roundness of the smooth curves for all types EXCEPT dynamic.
-SmoothType String optionalposition: 25
Possible options: 'dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'. Take a look at this example to see what these look like and pick the one that you like best! When using dynamic, the edges will have an invisible support node guiding the shape. This node is part of the physics simulation.
Possible values: dynamic, continuous, discrete, diagonalCross, straightCross, horizontal, vertical, curvedCW, curvedCCW, cubicBezier
-To String[] optionalposition: 1
Specifies the ending node of the link.
-WidthConstraint Nullable`1 optionalposition: 24
Specifies the width constraint for the link.

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.