Evotec

Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLTree

Namespace PSWriteHTML

Creates a new HTML tree using FancyTree with various customization options.

Remarks

This function creates a new HTML tree using FancyTree with the ability to customize the tree's appearance and behavior. It supports features like checkboxes, radio buttons, selection modes, icons, keyboard navigation, quick search, child counters, and more.

Examples

Authored help example

EXAMPLE 1


New-HTMLTree -Data {
    TreeNode -Node "Root" -Children {
        TreeNode -Node "Child 1"
        TreeNode -Node "Child 2"
    }
} -Checkbox 'checkbox' -SelectMode '3' -EnableChildCounter -WideSelection
        

Creates a new HTML tree with checkboxes, hierarchical selection mode, child counters, and wide selection enabled.

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.

Syntax

New-HTMLTree [-AutoCollapseSibling] [-AutoScroll] [-Checkbox <checkbox|radio>] [-Data <ScriptBlock>] [-DisableControl] [-DisableIcons] [-DisableKeyboardNavigation] [-EnableChildCounter] [-EnableQuickSearch] [-MinimumExpandLevel <Nullable`1>] [-SelectMode <1|2|3>] [-WideSelection] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AutoCollapseSibling SwitchParameter optionalposition: namedpipeline: False
Automatically collapses sibling nodes when a node is expanded.
AutoScroll SwitchParameter optionalposition: namedpipeline: False
Enables auto-scrolling when navigating the tree.
Checkbox String optionalposition: 1pipeline: Falsevalues: 2
Specifies the type of checkboxes to be displayed in the tree. Valid values are 'none', 'checkbox', or 'radio'. Default is 'none'.
Possible values: checkbox, radio
Data ScriptBlock optionalposition: 0pipeline: False
The script block that contains the data to populate the tree.
DisableControl SwitchParameter optionalposition: namedpipeline: False
Disables control features in the tree if this switch is present.
DisableIcons SwitchParameter optionalposition: namedpipeline: False
Disables icons in the tree if this switch is present.
DisableKeyboardNavigation SwitchParameter optionalposition: namedpipeline: False
Disables keyboard navigation in the tree if this switch is present.
EnableChildCounter SwitchParameter optionalposition: namedpipeline: False
Enables child counter display in the tree.
EnableQuickSearch SwitchParameter optionalposition: namedpipeline: False
Enables quick search functionality in the tree.
MinimumExpandLevel Nullable`1 optionalposition: 3pipeline: False
Specifies the minimum level of nodes to expand in the tree.
SelectMode Object optionalposition: 2pipeline: Falsevalues: 3
Specifies the selection mode for the tree. Valid values are 'none', '1', '2', or '3'. Default is '2'.
Possible values: 1, 2, 3
WideSelection SwitchParameter optionalposition: namedpipeline: False
Enables wide selection mode in the tree.