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

Module
PSWriteHTML

Creates a new HTML navigation menu with customizable options.

Syntax

New-HTMLNav
[-DisableBackgroundFading]
[-DisableClickToClose]
[-DisableHamburger]
[-DisableNavControls]
[-DisableStickyMenubar]
[-FixedMenu]
[[-LeftMenuBackgroundColor] <String>]
[[-LeftMenuColor] <String>]
[[-Logo] <String>]
[[-LogoLink] <String>]
[-LogoLinkHome]
[[-MenuWidth] <Int32>]
[[-MenuWidthExtended] <Int32>]
[[-NavigationLinks] <ScriptBlock>]
[-ResizeContent]
[-StartMenuOpen]
[[-TopBarBackGroundColor] <String>]
[[-TopBarColor] <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function creates a new HTML navigation menu with various customization options such as navigation links, logo, colors, and menu settings.

Examples

Example 1

New-HTMLNav -NavigationLinks { 'Home', 'About', 'Services' } -Logo 'logo.png' -LogoLink 'https://example.com' -TopBarBackGroundColor 'blue' -TopBarColor 'white' -LeftMenuBackgroundColor 'black' -LeftMenuColor 'white'

Creates a new HTML navigation menu with specified navigation links and custom logo, colors, and menu settings.

Parameters

-DisableBackgroundFading SwitchParameter optional
Switch to disable background fading when the side navigation drawer is open.
-DisableClickToClose SwitchParameter optional
Switch to disable closing opened items when the user clicks outside of them.
-DisableHamburger SwitchParameter optional
Switch to disable the hamburger menu icon.
-DisableNavControls SwitchParameter optional
Switch to disable navigation controls for adjusting drawer width and height.
-DisableStickyMenubar SwitchParameter optional
Switch to make the menubar static instead of sticky.
-FixedMenu SwitchParameter optional
Switch to make the menu fixed.
-LeftMenuBackgroundColor String optionalposition: 7
Specifies the background color of the left menu.
-LeftMenuColor String optionalposition: 8
Specifies the text color of the left menu.
Specifies the path to the logo image to be displayed in the menu.
Specifies the URL to link the logo to.
-LogoLinkHome SwitchParameter optional
Indicates whether the logo should link to the home page.
-MenuWidth Int32 optionalposition: 3
Specifies the width of the menu (default is 270).
-MenuWidthExtended Int32 optionalposition: 4
Specifies the extended width of the menu (default is 320).
Specifies the script block containing navigation links to be displayed in the menu.
-ResizeContent SwitchParameter optional
Switch to enable content resizing.
-StartMenuOpen SwitchParameter optional
Switch to determine if the menu should start open.
-TopBarBackGroundColor String optionalposition: 5
Specifies the background color of the top bar.
-TopBarColor String optionalposition: 6
Specifies the text color of the top bar.

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.