title: Powershell - search for string, remove excess whitespace, print second field
body: <p>I'm having a problem parsing some string data in powershell and need a little help. Basically I have an application command that doesn't output objects, rather string data.</p>
  
  <pre><code>a = is the item I'm searching for
  b = is the actual ouput from the command
  c = replaces all the excess whitespace with a single space
  d = is supposed to take $c "hostOSVersion 8.0.2 7-Mode" and just print "8.0.2 7-Mode"
  </code></pre>
  
  <p>However, $d is not working it just prints the same value as $c.  I'm a UNIX guy and this would be easy in one awk statement. If you know how to do this in one command that would be nice, or just tell me what's wrong with my $d syntax below.</p>
  
  <pre><code>$a = "hostOSVersion"
  $b = "hostOSVersion                           8.0.2 7-Mode"
  $c = ($a -replace "\s+", " ").Split(" ")
  $d = ($y -replace "$a ", "")
  </code></pre>