Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLToast

Namespace PSWriteHTML

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

Remarks

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.
        

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.

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

Parameters

BarColorLeft String optionalposition: namedpipeline: False
Specifies the color of the left bar in the notification.
BarColorRight String optionalposition: namedpipeline: False
Specifies the color of the right bar in the notification.
IconColor String optionalposition: namedpipeline: False
Specifies the color of the icon.
IconSize Int32 optionalposition: namedpipeline: False
Specifies the size of the icon in pixels.
IconSolid String optionalposition: namedpipeline: False
ICON SOLID
Text String optionalposition: namedpipeline: False
Specifies the main text content of the notification.
TextColor String optionalposition: namedpipeline: False
Specifies the color of the main text.
TextHeader String optionalposition: namedpipeline: False
Specifies the header text of the notification.
TextHeaderColor String optionalposition: namedpipeline: False
Specifies the color of the header text.
New-HTMLToast [-BarColorLeft <String>] [-BarColorRight <String>] [-IconColor <String>] [-IconRegular <String>] [-IconSize <Int32>] [-Text <String>] [-TextColor <String>] [-TextHeader <String>] [-TextHeaderColor <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeRegular

Parameters

BarColorLeft String optionalposition: namedpipeline: False
Specifies the color of the left bar in the notification.
BarColorRight String optionalposition: namedpipeline: False
Specifies the color of the right bar in the notification.
IconColor String optionalposition: namedpipeline: False
Specifies the color of the icon.
IconRegular String optionalposition: namedpipeline: False
ICON REGULAR
IconSize Int32 optionalposition: namedpipeline: False
Specifies the size of the icon in pixels.
Text String optionalposition: namedpipeline: False
Specifies the main text content of the notification.
TextColor String optionalposition: namedpipeline: False
Specifies the color of the main text.
TextHeader String optionalposition: namedpipeline: False
Specifies the header text of the notification.
TextHeaderColor String optionalposition: namedpipeline: False
Specifies the color of the header text.
New-HTMLToast [-BarColorLeft <String>] [-BarColorRight <String>] [-IconBrands <String>] [-IconColor <String>] [-IconSize <Int32>] [-Text <String>] [-TextColor <String>] [-TextHeader <String>] [-TextHeaderColor <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeBrands

Parameters

BarColorLeft String optionalposition: namedpipeline: False
Specifies the color of the left bar in the notification.
BarColorRight String optionalposition: namedpipeline: False
Specifies the color of the right bar in the notification.
IconBrands String optionalposition: namedpipeline: False
Specifies the icon to be used from the Font Awesome Brands collection.
IconColor String optionalposition: namedpipeline: False
Specifies the color of the icon.
IconSize Int32 optionalposition: namedpipeline: False
Specifies the size of the icon in pixels.
Text String optionalposition: namedpipeline: False
Specifies the main text content of the notification.
TextColor String optionalposition: namedpipeline: False
Specifies the color of the main text.
TextHeader String optionalposition: namedpipeline: False
Specifies the header text of the notification.
TextHeaderColor String optionalposition: namedpipeline: False
Specifies the color of the header text.