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

Module PSWriteHTML

Creates a new table percentage bar condition object with specified attributes.

Syntax

New-TablePercentageBarCondition [[-BackgroundColor] <String>] [[-BarColor] <String>] [-Maximum] <Int32> [-Minimum] <Int32> [[-TextColor] <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function creates a new table percentage bar condition object with the provided attributes. It defines the minimum and maximum values for the percentage range, along with the colors for the background, text, and bar.

Examples

Authored help example

EXAMPLE 1

New-TablePercentageBarCondition -Minimum 0 -Maximum 10 -BackgroundColor "#ff0000" -TextColor "#ffffff" -BarColor "#ff0000"
Creates a new table percentage bar condition object for the range 0-10 with specified colors.

EXAMPLE 2

New-TablePercentageBarCondition -Minimum 11 -Maximum 20 -BackgroundColor "#00ff00" -BarColor "#00ff00"
Creates a new table percentage bar condition object for the range 11-20 with specified colors.

EXAMPLE 3

New-TablePercentageBarCondition -Minimum 21 -Maximum 23 -BackgroundColor "#0000ff" -BarColor "#0000ff"
Creates a new table percentage bar condition object for the range 21-23 with specified colors.

EXAMPLE 4

New-TablePercentageBarCondition -Minimum 24 -Maximum 100 -BackgroundColor "#00FFFF" -BarColor "#00FFFF"
Creates a new table percentage bar condition object for the range 24-100 with specified colors.

Parameters

-BackgroundColor String optionalposition: 2
Specifies the background color for the percentage bar.
-BarColor String optionalposition: 4
Specifies the color of the percentage bar.
-Maximum Int32 requiredposition: 1
Specifies the maximum value for the percentage range.
-Minimum Int32 requiredposition: 0
Specifies the minimum value for the percentage range.
-TextColor String optionalposition: 3
Specifies the text color for the percentage 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.