title: Reading multiple values from a text file in powershell then manipulating the values
body: <p>Forgive the novice question, i'm new to powershell and am trying to do something which should be very easy!</p>
  
  <p>i have a text file with the following contents</p>
  
  <pre><code>DEVICE ID:   {E24CF707-F030-48DC-8E1A-59B96148BF52}
  DEVICE NAME: All Devices (RAINBOW-SRV)
  TYPE:        Drive pool
  DEVICE ID:   {D16DC75F-8A8B-4AEC-A411-9B0BC58CBF16}
  DEVICE NAME: HP 1
  TYPE:        Drive
  DEVICE ID:   {F2D2AB4A-1FBE-4158-AB62-6A94AE4392E2}
  DEVICE NAME: RAINBOW-SRV
  TYPE:        Machine
  DEVICE ID:   {23AD5D42-00A8-496B-96E5-1F5CAA3F9E9D}
  DEVICE NAME: Symantec Protection Network (RAINBOW-SRV)
  TYPE:        Symantec Protection Network
  RETURN VALUE: 1
  </code></pre>
  
  <p>I'm trying to get  the string that follows DEVICE NAME: on each occurence into an array to pass to a command further down the line.  I've tried the following code but get an error stating that Substring is not a valid method.</p>
  
  <p>I feel i'm missing something very obvious but cannot see it! any help would be much appreciated.</p>
  
  <p>Many Thanks</p>