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

Module PSWriteHTML

Creates a new table header with specified styling options.

Syntax

New-TableHeader [-AddRow] [[-Alignment] <left|center|right|justify>] [[-BackGroundColor] <String>] [[-Color] <String>] [[-ColumnCount] <Int32>] [[-Direction] <rtl>] [[-FontFamily] <String>] [[-FontSize] <Object>] [[-FontStyle] <normal|italic|oblique>] [[-FontVariant] <normal|small-caps>] [[-FontWeight] <String>] [[-Names] <String[]>] [[-ResponsiveOperations] <String>] [[-TextDecoration] <line-through|overline|underline>] [[-TextTransform] <uppercase|lowercase|capitalize>] [[-Title] <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

The New-TableHeader function creates a new table header with customizable styling options such as font size, color, alignment, and more.

Examples

Authored help example

EXAMPLE 1

New-TableHeader -Names "Name", "Age", "Email" -Title "Employee Information" -Color "black" -BackGroundColor "lightgray" -FontSize 14 -FontWeight "bold" -FontStyle "normal" -FontVariant "normal" -FontFamily "Arial" -Alignment "center" -TextDecoration "none" -TextTransform "uppercase" -Direction "ltr" -AddRow -ColumnCount 3 -Display "all"
Creates a table header with specified column names, title, and styling options.

Parameters

-AddRow SwitchParameter optional
Switch parameter to add an additional row to the table header.
-Alignment String optionalposition: 9
Specifies the alignment of the table header.
Possible values: left, center, right, justify
-BackGroundColor String optionalposition: 3
Specifies the background color of the table header.
-Color String optionalposition: 2
Specifies the text color of the table header.
-ColumnCount Int32 optionalposition: 13
Specifies the number of columns in the table header.
-Direction String optionalposition: 12
Specifies the text direction of the table header.
Possible values: rtl
-FontFamily String optionalposition: 8
Specifies the font family of the table header.
-FontSize Object optionalposition: 4
Specifies the font size of the table header.
-FontStyle String optionalposition: 6
Specifies the font style of the table header.
Possible values: normal, italic, oblique
-FontVariant String optionalposition: 7
Specifies the font variant of the table header.
Possible values: normal, small-caps
-FontWeight String optionalposition: 5
Specifies the font weight of the table header.
Possible values: normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900
-Names String[] optionalposition: 0
Specifies an array of column names for the table header.
-ResponsiveOperations String optionalposition: 14
Possible values: all, never, desktop, not-desktop, tablet-l, tablet-p, mobile-l, mobile-p, min-desktop, max-desktop, tablet, not-tablet, min-tablet, max-tablet, not-tablet-l, min-tablet-l, max-tablet-l, not-tablet-p, min-tablet-p, max-tablet-p, mobile, not-mobile, min-mobile, max-mobile, not-mobile-l, min-mobile-l, max-mobile-l, not-mobile-p, min-mobile-p, max-mobile-p
-TextDecoration String optionalposition: 10
Specifies the text decoration of the table header.
Possible values: line-through, overline, underline
-TextTransform String optionalposition: 11
Specifies the text transformation of the table header.
Possible values: uppercase, lowercase, capitalize
-Title String optionalposition: 1
Specifies the title of the table header.

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.