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

Module PSWriteHTML

Creates a new accordion item with specified header text and panel text.

Syntax

New-AccordionItem [[-HeaderAlign] <String>] [[-HeaderText] <String>] [[-PanelText] <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

This function creates a new accordion item with the provided header text and panel text. The header text is displayed as a clickable button to toggle the visibility of the panel text.

Examples

Authored help example

EXAMPLE 1

New-AccordionItem -HeaderText "Header 1" -HeaderAlign "left" -PanelText "Panel 1 Text"

Creates a new accordion item with the header text "Header 1" aligned to the left and panel text "Panel 1 Text".

EXAMPLE 2

New-AccordionItem -HeaderText "Header 2" -HeaderAlign "center" -PanelText "Panel 2 Text"

Creates a new accordion item with the header text "Header 2" aligned to the center and panel text "Panel 2 Text".

Parameters

-HeaderAlign String optionalposition: 1
The alignment of the header text. Accepted values are 'left', 'center', or 'right'.
-HeaderText String optionalposition: 0
The text to be displayed as the header of the accordion item.
-PanelText String optionalposition: 2
The text to be displayed in the panel of the accordion item.

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.