title: Power Shell progress bar colour
body: <p>I am trying to change the colour of the progress bar value but I can't seem to get it to work. The progress bar itself works but it is still in the default green. Any help would be greatly appreciated.</p>
  
  <pre><code>function  Add_ProgressBar ($name, $parent, $x, $y, $l, $h, $text){
      $object = New-Object System.Windows.Forms.progressbar
      $object.Location = New-Object System.Drawing.Point($x, $y)
      $object.Size = New-Object System.Drawing.size($l, $h)
      $object.Text = $text
      $object.Style  = 'Marquee'
      $object.ForeColor = 'Aqua'
      New-Variable $name -Value $object -Scope global
      (Get-Variable $parent).Value.Controls.Add((Get-Variable $name).Value)
  
  }
  </code></pre>