 
     
    Add-Type -AssemblyName System.Windows.Forms 
    Add-Type -AssemblyName System.Drawing 
    $MyForm = New-Object System.Windows.Forms.Form 
    $MyForm.Text="MyForm" 
    $MyForm.Size = New-Object System.Drawing.Size(300,300) 
     
 
        $mTreeView1 = New-Object System.Windows.Forms.TreeView 
                $mTreeView1.Text="TreeView1" 
                $mTreeView1.Top="5" 
                $mTreeView1.Left="5" 
                $mTreeView1.Anchor="Left,Top" 
        $mTreeView1.Size = New-Object System.Drawing.Size(100,23) 
        $MyForm.Controls.Add($mTreeView1) 
        $MyForm.ShowDialog()
