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

Module PSWriteHTML

Configures New-HTMLTable options

Syntax

New-HTMLTableOption [-ArrayJoin] [[-ArrayJoinString] <String>] [-BoolAsString] [[-Carriage] <String>] [[-DataStore] <HTML|JavaScript|AjaxJSON>] [[-DateTimeFormat] <String>] [[-NewLine] <String>] [[-NewLineCarriage] <String>] [-NumberAsString] [-PrettifyObject] [[-PrettifyObjectDateTimeFormat] <String>] [[-PrettifyObjectSeparator] <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Authored help example

EXAMPLE 1

New-HTML {
    New-HTMLTableOption -DateTimeFormat "yyyy-MM-dd HH:mm:ss" -BoolAsString
    New-HTMLSection -Invisible {
        New-HTMLSection -HeaderText 'Standard Table with PSCustomObjects' {
            New-HTMLTable -DataTable $DataTable1
        }
        New-HTMLSection -HeaderText 'Standard Table with PSCustomObjects' {
            New-HTMLTable -DataTable $DataTable1 -DataStore JavaScript
        }
    }
} -ShowHTML

Parameters

-ArrayJoin SwitchParameter optional
When JavaScript or AjaxJSON is used, forces any array to be a string regardless of depth level
-ArrayJoinString String optionalposition: 5
Uses defined string or char for array join. By default it uses comma with a space when used.
-BoolAsString SwitchParameter optional
When JavaScript or AjaxJSON is used, forces bool to string
-Carriage String optionalposition: 4
When JavaScript or AjaxJSON is used, one can configure Carriage. Default value for Carriage = "\r"
-DataStore String optionalposition: 0
Choose how Data is stored for all tables HTML, JavaScript or AjaxJSON (external file)
Possible values: HTML, JavaScript, AjaxJSON
-DateTimeFormat String optionalposition: 1
When JavaScript or AjaxJSON is used, one can configure DateTimeFormat (in PowerShell way)
-NewLine String optionalposition: 3
When JavaScript or AjaxJSON is used, one can configure NewLine. Default value for NewLine = "\n"
-NewLineCarriage String optionalposition: 2
When JavaScript or AjaxJSON is used, one can configure NewLineCarriage. Default NewLineCarriage = '<br>'
-NumberAsString SwitchParameter optional
When JavaScript or AjaxJSON is used, forces number to string
-PrettifyObject SwitchParameter optional
-PrettifyObjectDateTimeFormat String optionalposition: 7
-PrettifyObjectSeparator String optionalposition: 6

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.