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-NavLink

Module PSWriteHTML

Creates a new navigation link with customizable options for nested links.

Syntax

Description

The New-NavLink function creates a new navigation link with various customizable options such as nested links, name, name color, href, internal page ID, and icon color.

Examples

Authored help example

EXAMPLE 1

New-NavLink -NestedLinks { New-NavLink -Name "Sublink 1" -Href "/sublink1" } -Name "Main Link" -NameColor "blue" -Href "/mainlink" -InternalPageID "main" -IconColor "green"
Creates a new navigation link named "Main Link" with a nested link named "Sublink 1" in blue name color, green icon color, navigating to "/mainlink" with internal page ID "main".

EXAMPLE 2

New-NavLink -NestedLinks { New-NavLink -Name "Sublink 2" -Href "/sublink2" } -Name "Another Link" -NameColor "red" -Href "/anotherlink" -InternalPageID "another" -IconColor "yellow"
Creates a new navigation link named "Another Link" with a nested link named "Sublink 2" in red name color, yellow icon color, navigating to "/anotherlink" with internal page ID "another".

Parameters

-Href String optional
Specifies the URL to navigate to when the navigation link is clicked.
-IconColor String optional
Specifies the color of the icon for the navigation link.
-IconSolid String optionalsets: FontAwesomeSolid
ICON SOLID
-InternalPageID String optional
Specifies the internal page ID associated with the navigation link.
-Name String required
Specifies the name of the navigation link. This parameter is mandatory.
-NameColor String optional
Specifies the color of the navigation link name.
Specifies the script block defining the nested link properties.
-Bordered SwitchParameter optionalsets: FontMaterial
-BorderedCircle SwitchParameter optionalsets: FontMaterial
-FlipHorizontal SwitchParameter optionalsets: FontMaterial
-FlipVertical SwitchParameter optionalsets: FontMaterial
-IconMaterial String optionalsets: FontMaterial
FontsMaterialIcon
-PullLeft SwitchParameter optionalsets: FontMaterial
-PullRight SwitchParameter optionalsets: FontMaterial
-Rotate String optionalsets: FontMaterial
Possible values: 90, 180, 270
-Spinning SwitchParameter optionalsets: FontMaterial
-SpinningReverse SwitchParameter optionalsets: FontMaterial
-IconRegular String optionalsets: FontAwesomeRegular
ICON REGULAR
-IconBrands String optionalsets: FontAwesomeBrands
ICON BRANDS

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.