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

EmailListItem

Module PSWriteHTML

Creates an HTML list item with customizable text styling.

Syntax

EmailListItem [[-Alignment] <left|center|right|justify>] [[-BackGroundColor] <String[]>] [[-Color] <String[]>] [[-Direction] <rtl>] [[-FontFamily] <String[]>] [[-FontSize] <Int32[]>] [[-FontStyle] <normal|italic|oblique>] [[-FontVariant] <normal|small-caps>] [[-FontWeight] <String[]>] [-LineBreak] [[-Text] <String[]>] [[-TextDecoration] <line-through|overline|underline>] [[-TextTransform] <uppercase|lowercase|capitalize>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

The EmailListItem function generates an HTML list item with customizable text styling options such as color, font size, font weight, font style, alignment, text decoration, text transformation, and more.

Examples

Authored help example

EXAMPLE 1

EmailListItem -Text "Example Text" -Color "red" -FontSize 14 -FontWeight "bold" -Alignment "center"
Creates an HTML list item with the text "Example Text" in red color, font size 14, bold font weight, and centered alignment.

Parameters

-Alignment String[] optionalposition: 8
Specifies the alignment of the text. Valid values are 'left', 'center', 'right', 'justify'. Default is an empty array.
Possible values: left, center, right, justify
-BackGroundColor String[] optionalposition: 2
Specifies the background color of the list item. Default is an empty array.
-Color String[] optionalposition: 1
Specifies the color of the text. Default is an empty array.
-Direction String[] optionalposition: 11
Specifies the direction of the text. Valid value is 'rtl'. Default is an empty array.
Possible values: rtl
-FontFamily String[] optionalposition: 7
Specifies the font family of the text. Default is an empty array.
-FontSize Int32[] optionalposition: 3
Specifies the font size of the text. Default is an empty array.
-FontStyle String[] optionalposition: 5
Specifies the font style of the text. Valid values are 'normal', 'italic', 'oblique'. Default is an empty array.
Possible values: normal, italic, oblique
-FontVariant String[] optionalposition: 6
Specifies the font variant of the text. Valid values are 'normal', 'small-caps'. Default is an empty array.
Possible values: normal, small-caps
-FontWeight String[] optionalposition: 4
Specifies the font weight of the text. Valid values are 'normal', 'bold', 'bolder', 'lighter', and numeric values from 100 to 900. Default is an empty array.
Possible values: normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900
-LineBreak SwitchParameter optional
Indicates whether a line break should be added after the list item.
-Text String[] optionalposition: 0
Specifies the text content of the list item.
-TextDecoration String[] optionalposition: 9
Specifies the text decoration of the text. Valid values are 'none', 'line-through', 'overline', 'underline'. Default is an empty array.
Possible values: line-through, overline, underline
-TextTransform String[] optionalposition: 10
Specifies the text transformation of the text. Valid values are 'uppercase', 'lowercase', 'capitalize'. Default is an empty array.
Possible values: uppercase, lowercase, capitalize

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.