API Reference
Function
New-HTMLTreeNode
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
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 SetsParameters
- Checkbox String
- Specifies the type of checkbox for the tree node. Valid values are 'none', 'checkbox', or 'radio'.
- Possible values:
checkbox,radio - Children ScriptBlock
- Specifies the script block that defines the children nodes of the tree node.
- Folder SwitchParameter
- Indicates whether the tree node represents a folder.
- HrefLink String
- Specifies the URL link for the tree node.
- Icon String
- Specifies the icon for the tree node.
- IconTooltip String
- Specifies the tooltip text for the icon.
- Id String
- Specifies the unique identifier of the tree node.
- IsExpanded SwitchParameter
- Indicates whether the tree node is expanded.
- IsSelected SwitchParameter
- Indicates whether the tree node is selected.
- Target String
- Specifies the target window for the URL link. Valid values are "_blank", "_self", "_parent", "_top", or a frame name.
- Title String
- Specifies the title of the tree node.
- Tooltip String
- Specifies the tooltip text for the tree node.
- Unselectable SwitchParameter
- Indicates whether the tree node is unselectable.