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

Module PSWriteHTML

Creates an HTML font icon with specified parameters.

Syntax

New-HTMLFontIcon [-AsCSS] [-AsHashTable] [-FixedWidth] [-IconColor <String>] [-IconSize <Int32>] [-IconSolid <String>] [-Name <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeSolid
New-HTMLFontIcon [-AsCSS] [-AsHashTable] [-Bordered] [-BorderedCircle] [-FixedWidth] [-FlipHorizontal] [-FlipVertical] [-IconColor <String>] [-IconMaterial <String>] [-IconSize <Int32>] [-ListIcons] [-Name <String>] [-PullLeft] [-PullRight] [-Rotate <90|180|270>] [-Spinning] [-SpinningReverse] [<CommonParameters>]
#
Parameter set: FontMaterial
New-HTMLFontIcon [-AsCSS] [-AsHashTable] [-FixedWidth] [-IconColor <String>] [-IconRegular <String>] [-IconSize <Int32>] [-Name <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeRegular
New-HTMLFontIcon [-AsCSS] [-AsHashTable] [-FixedWidth] [-IconBrands <String>] [-IconColor <String>] [-IconSize <Int32>] [-Name <String>] [<CommonParameters>]
#
Parameter set: FontAwesomeBrands

Description

This function generates an HTML font icon based on the provided parameters such as icon size, color, and specific icon set (e.g., FontAwesomeBrands, FontAwesomeRegular, FontAwesomeSolid, FontMaterial).

Examples

Authored help example

EXAMPLE 1

New-HTMLFontIcon -IconSize 24 -IconColor "red" -IconBrands "fa-github"
Generates an HTML font icon with a size of 24, red color, and the GitHub icon from the FontAwesomeBrands set.

EXAMPLE 2

New-HTMLFontIcon -IconSize 32 -IconColor "blue" -IconRegular "fa-envelope"
Generates an HTML font icon with a size of 32, blue color, and the envelope icon from the FontAwesomeRegular set.

Parameters

-AsCSS SwitchParameter optional
-AsHashTable SwitchParameter optional
-FixedWidth SwitchParameter optional
-IconColor String optional
Specifies the color of the icon.
-IconSize Int32 optional
Specifies the size of the icon.
-IconSolid String optionalsets: FontAwesomeSolid
Specifies the icon from the FontAwesomeSolid set.
-Name String optional
-Bordered SwitchParameter optionalsets: FontMaterial
-BorderedCircle SwitchParameter optionalsets: FontMaterial
-FlipHorizontal SwitchParameter optionalsets: FontMaterial
-FlipVertical SwitchParameter optionalsets: FontMaterial
-IconMaterial String optionalsets: FontMaterial
FontsMaterialIcon
-ListIcons SwitchParameter optionalsets: FontMaterial
for using within UL/LI http://zavoloklom.github.io/material-design-iconic-font/examples.html
-PullLeft SwitchParameter optionalsets: FontMaterial
-PullRight SwitchParameter optionalsets: FontMaterial
-Rotate String optionalsets: FontMaterial
[parameter(ParameterSetName = "FontMaterial")][switch] $Wobble, [parameter(ParameterSetName = "FontMaterial")][switch] $FadeInLeft, [parameter(ParameterSetName = "FontMaterial")][switch] $Pulse,
Possible values: 90, 180, 270
-Spinning SwitchParameter optionalsets: FontMaterial
-SpinningReverse SwitchParameter optionalsets: FontMaterial
-IconRegular String optionalsets: FontAwesomeRegular
Specifies the icon from the FontAwesomeRegular set.
-IconBrands String optionalsets: FontAwesomeBrands
Specifies the icon from the FontAwesomeBrands set.

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.