Sorry just started playing with this code.
Not quite sure how to get the selected node?

Rory

Code:
 $TreeView = $Form.TreeView()
$TreeView.Width = $Form.ClientWidth / 4
$TreeView.Dock = 3

$MachineArray=MPW002841,MPW002842,MPW002843,MPW002844,MPW002845,MPW002846,MPW002847,MPW002848,MPW002849,MPW002850
$RootNode = $TreeView.Nodes.Add("Machine List",45,46)

For Each $Machine in $MachineArray
$MachineNode = $RootNode.Nodes.Add("$Machine",45,46)
$MachineNode.tag=$Machine
$Logs = $MachineNode.Nodes.Add("Logs",45,46)
$Audit = $Logs.Nodes.Add("Audit",45,46)
$Diagnostic = $Logs.Nodes.Add("Diagnostic",45,46)
$Distribution = $Logs.Nodes.Add("Distribution",45,46)
$Installation = $Logs.Nodes.Add("Installation",45,46)
$Services = $MachineNode.Nodes.Add("Services",45,46)
$CNCService = $Services.Nodes.Add("NSPIS CNC Software Distribution",45,46)
$SU = $Services.Nodes.Add("SU",45,46)
$TimeSync = $Services.Nodes.Add("TimeSync",45,46)
Next