Project

PSWriteHTML

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

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

New-HTMLNavTop

Module
PSWriteHTML

Creates a top navigation bar in HTML format with customizable options.

Syntax

New-HTMLNavTop
[-Convert]
[[-HomeColor] <String>]
[[-HomeColorBackground] <String>]
[[-HomeLink] <String>]
[-HomeLinkHome]
[[-Logo] <String>]
[[-LogoLink] <String>]
[-LogoLinkHome]
[[-MenuColor] <String>]
[[-MenuColorBackground] <String>]
[[-MenuItemsWidth] <Object>]
[[-NavigationLinks] <ScriptBlock>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function generates a top navigation bar in HTML format with customizable options such as navigation links, logo, colors, and more.

Examples

Example 1

New-HTMLNavTop -NavigationLinks {
    "Link 1", "Link 2", "Link 3"
} -Logo "logo.png" -LogoLink "https://example.com" -LogoLinkHome -MenuItemsWidth '250px' -MenuColor 'Blue' -MenuColorBackground 'White' -HomeColor 'Red' -HomeColorBackground 'White' -HomeLink "https://example.com/home" -HomeLinkHome
Creates a top navigation bar with specified navigation links, logo, colors, and home link.

Parameters

-Convert SwitchParameter optional
Switch parameter to indicate if conversion is needed.
-HomeColor String optionalposition: 6
Specifies the color of the home link text.
-HomeColorBackground String optionalposition: 7
Specifies the background color of the home link.
Specifies the URL for the home link.
-HomeLinkHome SwitchParameter optional
Indicates whether the home link should link to the home page.
Specifies the path to the logo image.
Specifies the URL to link the logo to.
-LogoLinkHome SwitchParameter optional
Indicates whether the logo should link to the home page.
-MenuColor String optionalposition: 4
Specifies the color of the menu text.
-MenuColorBackground String optionalposition: 5
Specifies the background color of the menu.
-MenuItemsWidth Object optionalposition: 3
Specifies the width of the menu items.
Specifies the script block containing the navigation links to be displayed.

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.