title: Multiple Line output display in windows FORM textbox
body: <p>I would like to display multiple line output which is coming from for-each loop to a text box in WINDOWS FORM. Below is my code.But as per this code it's displaying only last machine details as every time it's replacing the $outputBox.Text value.</p>
  
  <p>Please help me to display hole output value.  </p>
  
  <pre><code>function pingInfo
  {
  $sys = $InputBox.lines
  foreach ($system in $sys)
  {
      if(!(Test-Connection -Cn $system -BufferSize 16 -Count 1 -ea 0 -quiet))
          {
          $viv = ($system).ToUpper() 
          $outputBox.ForeColor = [System.Drawing.Color]::red
          $outputBox.Text = "$viv" + "OFFLINE"
  
         }
      else
         {
          $viv = $system
          $viv = ($system).ToUpper()
          $outputBox.ForeColor = [System.Drawing.Color]::Green
          $outputBox.Text = "$viv" + "ONLINE"
         }          
      }
  }
  </code></pre>