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

Module PSWriteHTML

Creates a new navigation top menu item with customizable options.

Syntax

New-NavTopMenu [-Href <String>] [-IconColor <String>] [-IconSolid <String>] [-InternalPageID <String>] [[-MenuItem] <ScriptBlock>] -Name <String> [<CommonParameters>]
#
Parameter set: FontAwesomeSolid
New-NavTopMenu [-Bordered] [-BorderedCircle] [-FlipHorizontal] [-FlipVertical] [-Href <String>] [-IconColor <String>] [-IconMaterial <String>] [-InternalPageID <String>] [[-MenuItem] <ScriptBlock>] -Name <String> [-PullLeft] [-PullRight] [-Rotate <90|180|270>] [-Spinning] [-SpinningReverse] [<CommonParameters>]
#
Parameter set: FontMaterial
New-NavTopMenu [-Href <String>] [-IconColor <String>] [-IconRegular <String>] [-InternalPageID <String>] [[-MenuItem] <ScriptBlock>] -Name <String> [<CommonParameters>]
#
Parameter set: FontAwesomeRegular
New-NavTopMenu [-Href <String>] [-IconBrands <String>] [-IconColor <String>] [-InternalPageID <String>] [[-MenuItem] <ScriptBlock>] -Name <String> [<CommonParameters>]
#
Parameter set: FontAwesomeBrands

Description

The New-NavTopMenu function creates a new navigation top menu item with various customizable options such as icon, name, href, and more.

Examples

Authored help example

EXAMPLE 1

New-NavTopMenu -Name "Home" -Href "/home" -IconBrands "fa fa-home" -IconColor "blue"
Creates a new navigation top menu item named "Home" with a home icon from Font Awesome Brands in blue color.

EXAMPLE 2

New-NavTopMenu -Name "About" -Href "/about" -IconRegular "fa fa-info-circle" -IconColor "green"
Creates a new navigation top menu item named "About" with an info circle icon from Font Awesome Regular in green color.

Parameters

-Href String optional
Specifies the URL to navigate to when the menu item is clicked.
-IconColor String optional
Specifies the color of the icon.
-IconSolid String optionalsets: FontAwesomeSolid
ICON SOLID
-InternalPageID String optional
Specifies the internal page ID associated with the menu item.
-MenuItem ScriptBlock optionalposition: 0
Specifies the script block defining the menu item properties.
-Name String required
Specifies the name of the menu item. This parameter is mandatory.
-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
Specifies the icon for the menu item from the Font Awesome Regular collection.
-IconBrands String optionalsets: FontAwesomeBrands
Specifies the icon for the menu item from the Font Awesome Brands collection.

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.