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

Namespace PSWriteHTML

Creates a new HTML tree node with specified properties.

Remarks

This function creates a new HTML tree node with the specified properties. It allows for customization of various attributes such as title, ID, folder structure, tooltip, icon, selection status, expansion status, etc.

Examples

Authored help example

EXAMPLE 1


New-HTMLTreeNode -Title "Folder 1" -Id "folder1" -Folder -Children {
    New-HTMLTreeNode -Title "Item 1" -Id "item1"
    New-HTMLTreeNode -Title "Item 2" -Id "item2"
}
        

EXAMPLE 2


New-HTMLTreeNode -Title "Document" -Id "doc1" -HrefLink "https://example.com" -Target "_blank"
        

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-HTMLTreeNode [-Checkbox <checkbox|radio>] [-Children <ScriptBlock>] [-Folder] [-HrefLink <String>] [-Icon <String>] [-IconTooltip <String>] [-Id <String>] [-IsExpanded] [-IsSelected] [-Target <String>] [-Title <String>] [-Tooltip <String>] [-Unselectable] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Checkbox String optionalposition: 6pipeline: Falsevalues: 2
Specifies the type of checkbox for the tree node. Valid values are 'none', 'checkbox', or 'radio'.
Possible values: checkbox, radio
Children ScriptBlock optionalposition: 0pipeline: False
Specifies the script block that defines the children nodes of the tree node.
Folder SwitchParameter optionalposition: namedpipeline: False
Indicates whether the tree node represents a folder.
HrefLink String optionalposition: 7pipeline: Falsealiases: Href, Link, Url, UrlLink
Specifies the URL link for the tree node.
Icon String optionalposition: 4pipeline: False
Specifies the icon for the tree node.
IconTooltip String optionalposition: 5pipeline: False
Specifies the tooltip text for the icon.
Id String optionalposition: 2pipeline: False
Specifies the unique identifier of the tree node.
IsExpanded SwitchParameter optionalposition: namedpipeline: Falsealiases: Expanded
Indicates whether the tree node is expanded.
IsSelected SwitchParameter optionalposition: namedpipeline: False
Indicates whether the tree node is selected.
Target String optionalposition: 8pipeline: False
Specifies the target window for the URL link. Valid values are "_blank", "_self", "_parent", "_top", or a frame name.
Title String optionalposition: 1pipeline: False
Specifies the title of the tree node.
Tooltip String optionalposition: 3pipeline: False
Specifies the tooltip text for the tree node.
Unselectable SwitchParameter optionalposition: namedpipeline: False
Indicates whether the tree node is unselectable.