New-UDTreeNode
Synopsis
Creates a tree node.
Syntax
New-UDTreeNode [-Name] <String> [-Id <String>] [-Children <ScriptBlock>] [-Leaf] [-Icon <Object>] [-ExpandedIcon <Object>] [-Expanded] [<CommonParameters>]Description
Creates a tree node. This cmdlet should be used with New-UDTreeView.
Parameters
-Name
The name of the node. This is displayed within the UI.
Required? true
Position? 2
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false-Id
The ID of the node. This is passed to the $EventData property when the OnNodeClicked script block is set.
-Children
The children of this node. This should be a collection of New-UDTreeNodes.
-Leaf
This is a leaf node and should not display children. Added in PSU 2.6.
-Icon
The icon to display for this node. Use New-UDIcon to create this icon. Added in PSU 2.6.
-ExpandedIcon
The icon to display for this node when it is expanded. Use New-UDIcon to create this icon. Added in PSU 2.6.
-Expanded
Common parameters
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.
Outputs
Examples
Example 1
See New-UDTreeView for examples.
Last updated
Was this helpful?