title: How get String from Textbox in windows Form
body: <p>i am an SCCM administrator ,so i am planing to make some automation with powershell using GUI </p>
  
  <p>so i need to input some values from windowsform. can anyone help me to get value from texbox</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") 
  [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") 
  
  #Creating Form
  $objForm = New-Object System.Windows.Forms.Form 
  $objForm.Text = "Data Entry Form"
  $objForm.Size = New-Object System.Drawing.Size(300,500) 
  $objForm.StartPosition = "CenterScreen"
  
  
  
  #Creating Label
  $objLabel = New-Object System.Windows.Forms.Label
  $objLabel.Location = New-Object System.Drawing.Size(10,20) 
  $objLabel.Size = New-Object System.Drawing.Size(280,20) 
  $objLabel.Text = "Enter collection Name"
  $objForm.Controls.Add($objLabel) 
  
  #Creating Teextbox
  $objTextBox = New-Object System.Windows.Forms.TextBox 
  $objTextBox.Location = New-Object System.Drawing.Size(10,40) 
  $objTextBox.Size = New-Object System.Drawing.Size(260,20) 
  $objForm.Controls.Add($objTextBox) 
   
   #How to take input from the Textbox here???
   #so that i can pass the input string to powershell commands</code></pre>
  </div>
  </div>
  </p>