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

Module PSWriteHTML

Creates a new table percentage bar object with specified attributes.

Syntax

New-TablePercentageBar [[-BackgroundColor] <String>] [[-BarColor] <String>] [[-BorderColor] <String>] [[-BorderStyle] <solid|outset|groove|ridge>] [[-ColumnID] <Int32>] [[-ColumnName] <String>] [[-ConditionalFormatting] <ScriptBlock>] [[-RoundValue] <Int32>] [[-TextColor] <String>] [[-Type] <square|round>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function creates a new table percentage bar object with the provided attributes. It allows customization of the appearance of the percentage bar within a table.

Examples

Authored help example

EXAMPLE 1

New-TablePercentageBar -ColumnID 1 -ColumnName "Progress" -Type 'round' -TextColor "#ffffff" -BorderColor "#000000" -BorderStyle 'solid' -BarColor "#00ff00" -BackgroundColor "#ffffff" -RoundValue 2

Description: Creates a new table percentage bar object for the column "Progress" with specified attributes.

Parameters

-BackgroundColor String optionalposition: 8
Specifies the background color of the percentage bar.
-BarColor String optionalposition: 7
Specifies the color of the percentage bar itself.
-BorderColor String optionalposition: 5
Specifies the color of the border of the percentage bar.
-BorderStyle String optionalposition: 6
Specifies the style of the border of the percentage bar. Valid values are 'solid', 'outset', 'groove', or 'ridge'.
Possible values: solid, outset, groove, ridge
-ColumnID Int32 optionalposition: 1
Specifies the ID of the column where the percentage bar will be displayed.
-ColumnName String optionalposition: 2
Specifies the name of the column where the percentage bar will be displayed.
-ConditionalFormatting ScriptBlock optionalposition: 0
Specifies any conditional formatting rules for the percentage bar.
-RoundValue Int32 optionalposition: 9
Specifies the decimal places to round the percentage value to.
-TextColor String optionalposition: 4
Specifies the color of the text within the percentage bar.
-Type String optionalposition: 3
Specifies the shape of the percentage bar. Valid values are 'square' or 'round'.
Possible values: square, round

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.