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

Aliases: New-HTMLTableCondition
Namespace PSWriteHTML
Aliases
New-HTMLTableCondition

Creates a new table condition with specified parameters and styling options for pass and fail conditions.

Remarks

This function creates a new table condition with the specified parameters and allows customization of the styling options for both pass and fail conditions.

Examples

Authored help example

EXAMPLE 1


New-TableCondition -Name 'Policies_Go' -ComparisonType number -Operator le -Value 0.2 -Color SeaGreen -FailColor FireBrick
        

Uses a PowerShell numeric literal with a dot decimal separator.

EXAMPLE 2


New-TableCondition -Name 'Policies_Go' -ComparisonType number -Operator le -Value '0,2' -Color SeaGreen -FailColor FireBrick
        

Uses a quoted locale-formatted decimal string. Avoid bare -Value 0,2 because PowerShell treats it as an array.

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-TableCondition [-Alignment <left|center|right|justify>] [-BackgroundColor <String>] [-CaseSensitive] [-ChildRowFill <Parent|Both>] [-Color <String>] [-ComparisonType <number|string|bool|date>] [-DateTimeFormat <String>] [-Direction <rtl>] [-FailAlignment <left|center|right|justify>] [-FailBackgroundColor <String>] [-FailColor <String>] [-FailDirection <rtl>] [-FailFontFamily <String>] [-FailFontSize <Object>] [-FailFontStyle <normal|italic|oblique>] [-FailFontVariant <normal|small-caps>] [-FailFontWeight <normal>] [-FailTextDecoration <line-through|overline|underline>] [-FailTextTransform <uppercase|lowercase|capitalize>] [-FontFamily <String>] [-FontSize <Object>] [-FontStyle <normal|italic|oblique>] [-FontVariant <normal|small-caps>] [-FontWeight <normal>] [-HighlightHeaders <String[]>] [-Inline] -Name <String> [-Operator <lt>] [-ReverseCondition] [-Row] [-TextDecoration <line-through|overline|underline>] [-TextTransform <uppercase|lowercase|capitalize>] [-Value <Object>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Alignment String optionalposition: 14pipeline: Falsevalues: 4
Specifies the alignment for pass conditions.
Possible values: left, center, right, justify
BackgroundColor String optionalposition: 8pipeline: False
Specifies the background color for pass conditions.
CaseSensitive SwitchParameter optionalposition: namedpipeline: False
Switch parameter to indicate if the comparison should be case-sensitive.
ChildRowFill String optionalposition: 6pipeline: Falsevalues: 2
Child row fill for responsive lists
Possible values: Parent, Both
Color String optionalposition: 7pipeline: False
Specifies the text color for pass conditions.
ComparisonType String optionalposition: 2pipeline: Falsealiases: Typevalues: 4
Specifies the type of comparison to be performed. Valid values are 'number', 'string', 'bool', or 'date'.
Possible values: number, string, bool, date
DateTimeFormat String optionalposition: 5pipeline: False
Specifies the format for date and time comparisons.
Direction String optionalposition: 17pipeline: Falsevalues: 1
Specifies the text direction for pass conditions.
Possible values: rtl
FailAlignment String optionalposition: 25pipeline: Falsevalues: 4
Specifies the alignment for fail conditions.
Possible values: left, center, right, justify
FailBackgroundColor String optionalposition: 19pipeline: False
Specifies the background color for fail conditions.
FailColor String optionalposition: 18pipeline: False
Specifies the text color for fail conditions.
FailDirection String optionalposition: 28pipeline: Falsevalues: 1
Specifies the text direction for fail conditions.
Possible values: rtl
FailFontFamily String optionalposition: 24pipeline: False
Specifies the font family for fail conditions.
FailFontSize Object optionalposition: 20pipeline: False
Specifies the font size for fail conditions.
FailFontStyle String optionalposition: 22pipeline: Falsevalues: 3
Specifies the font style for fail conditions.
Possible values: normal, italic, oblique
FailFontVariant String optionalposition: 23pipeline: Falsevalues: 2
Specifies the font variant for fail conditions.
Possible values: normal, small-caps
FailFontWeight String optionalposition: 21pipeline: Falsevalues: 13
Specifies the font weight for fail conditions.
Possible values: normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900
FailTextDecoration String optionalposition: 26pipeline: Falsevalues: 3
Specifies the text decoration for fail conditions.
Possible values: line-through, overline, underline
FailTextTransform String optionalposition: 27pipeline: Falsevalues: 3
Specifies the text transformation for fail conditions.
Possible values: uppercase, lowercase, capitalize
FontFamily String optionalposition: 13pipeline: False
Specifies the font family for pass conditions.
FontSize Object optionalposition: 9pipeline: False
Specifies the font size for pass conditions.
FontStyle String optionalposition: 11pipeline: Falsevalues: 3
Specifies the font style for pass conditions.
Possible values: normal, italic, oblique
FontVariant String optionalposition: 12pipeline: Falsevalues: 2
Specifies the font variant for pass conditions.
Possible values: normal, small-caps
FontWeight String optionalposition: 10pipeline: Falsevalues: 13
Specifies the font weight for pass conditions.
Possible values: normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900
HighlightHeaders String[] optionalposition: 1pipeline: False
Specifies an array of headers to highlight based on the condition.
Inline SwitchParameter optionalposition: namedpipeline: False
Switch parameter to indicate if the styling should be applied inline.
Name String requiredposition: 0pipeline: Falsealiases: ColumnName
Specifies the name of the condition.
Operator String optionalposition: 3pipeline: Falsevalues: 14
Specifies the comparison operator to be used.
Possible values: lt, le, eq, ge, gt, ne, contains, like, notlike, notcontains, between, betweenInclusive, in, notin
ReverseCondition SwitchParameter optionalposition: namedpipeline: False
Switch parameter to reverse the comparison logic.
Row SwitchParameter optionalposition: namedpipeline: False
Switch parameter to indicate if the styling should be applied to the entire row.
TextDecoration String optionalposition: 15pipeline: Falsevalues: 3
Specifies the text decoration for pass conditions.
Possible values: line-through, overline, underline
TextTransform String optionalposition: 16pipeline: Falsevalues: 3
Specifies the text transformation for pass conditions.
Possible values: uppercase, lowercase, capitalize
Value Object optionalposition: 4pipeline: False
Specifies the value to compare against. In PowerShell decimal literals use a dot, for example 0.2. If you want to pass locale-formatted text such as 0,2, quote it as a string. Bare 0,2 is parsed by PowerShell as an array containing 0 and 2 before PSWriteHTML receives it.