# New-NavLink

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

Project

PSWriteHTML

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

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

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

## Syntax

```
New-NavLink
[-Href <String>]
[-IconColor <String>]
[-IconSolid <String>]
[-InternalPageID <String>]
-Name <String>
[-NameColor <String>]
[[-NestedLinks] <ScriptBlock>]
[<CommonParameters>]
```

[#](#method-new-navlink-string-string-string-string-string-string-scriptblock)

Parameter set: `FontAwesomeSolid`

```
New-NavLink
[-Bordered]
[-BorderedCircle]
[-FlipHorizontal]
[-FlipVertical]
[-Href <String>]
[-IconColor <String>]
[-IconMaterial <String>]
[-InternalPageID <String>]
-Name <String>
[-NameColor <String>]
[[-NestedLinks] <ScriptBlock>]
[-PullLeft]
[-PullRight]
[-Rotate <90|180|270>]
[-Spinning]
[-SpinningReverse]
[<CommonParameters>]
```

[#](#member-128fedab0cd4c4037a53ec22)

Parameter set: `FontMaterial`

```
New-NavLink
[-Href <String>]
[-IconColor <String>]
[-IconRegular <String>]
[-InternalPageID <String>]
-Name <String>
[-NameColor <String>]
[[-NestedLinks] <ScriptBlock>]
[<CommonParameters>]
```

[#](#method-new-navlink-string-string-string-string-string-string-scriptblock-2)

Parameter set: `FontAwesomeRegular`

```
New-NavLink
[-Href <String>]
[-IconBrands <String>]
[-IconColor <String>]
[-InternalPageID <String>]
-Name <String>
[-NameColor <String>]
[[-NestedLinks] <ScriptBlock>]
[<CommonParameters>]
```

[#](#method-new-navlink-string-string-string-string-string-string-scriptblock-3)

Parameter set: `FontAwesomeBrands`

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

### Example 1

```powershell
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

```powershell
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.

**-NestedLinks ScriptBlock optionalposition: 0**

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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:2916941E50FA373D8406F246C72F807648470A64B251F0E9398A942ABE76013D -->
