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

Module PSWriteHTML

Creates a new HTML toast notification with customizable text, icons, and colors.

Syntax

New-HTMLToast [-BarColorLeft <String>] [-BarColorRight <String>] [-IconColor <String>] [-IconSize <Int32>] [-IconSolid <String>] [-Text <String>] [-TextColor <String>] [-TextHeader <String>] [-TextHeaderColor <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeSolid
New-HTMLToast [-BarColorLeft <String>] [-BarColorRight <String>] [-IconColor <String>] [-IconRegular <String>] [-IconSize <Int32>] [-Text <String>] [-TextColor <String>] [-TextHeader <String>] [-TextHeaderColor <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeRegular
New-HTMLToast [-BarColorLeft <String>] [-BarColorRight <String>] [-IconBrands <String>] [-IconColor <String>] [-IconSize <Int32>] [-Text <String>] [-TextColor <String>] [-TextHeader <String>] [-TextHeaderColor <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeBrands

Description

This function generates an HTML toast notification with options to set the text, text colors, icons, icon size, and various color settings for different elements of the notification.

Examples

Authored help example

EXAMPLE 1

New-HTMLToast -TextHeader "Notification" -Text "This is a sample notification" -IconBrands "fa-github" -BarColorRight "Red"
Creates a new HTML toast notification with a header "Notification", main text "This is a sample notification", GitHub icon, and a red color for the right bar.

EXAMPLE 2

New-HTMLToast -TextHeader "Alert" -Text "Alert message here" -IconBrands "fa-exclamation-triangle" -IconColor "Orange" -BarColorLeft "Yellow" -BarColorRight "Red"
Creates a new HTML toast notification with a header "Alert", main text "Alert message here", warning triangle icon in orange color, yellow left bar, and red right bar.

Parameters

-BarColorLeft String optional
Specifies the color of the left bar in the notification.
-BarColorRight String optional
Specifies the color of the right bar in the notification.
-IconColor String optional
Specifies the color of the icon.
-IconSize Int32 optional
Specifies the size of the icon in pixels.
-IconSolid String optionalsets: FontAwesomeSolid
ICON SOLID
-Text String optional
Specifies the main text content of the notification.
-TextColor String optional
Specifies the color of the main text.
-TextHeader String optional
Specifies the header text of the notification.
-TextHeaderColor String optional
Specifies the color of the header text.
-IconRegular String optionalsets: FontAwesomeRegular
ICON REGULAR
-IconBrands String optionalsets: FontAwesomeBrands
Specifies the icon to be used 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.