title: get first two digits by using split method in powershell
body: <p>I want to split one output. the output is</p>
  
  <pre><code>02|05|002|004|0014|0035|R
  </code></pre>
  
  <p>I tried with </p>
  
  <pre><code>$state.ToString().Split("|")[0]
  </code></pre>
  
  <p>i got the result like <code>System.Object[]</code></p>
  
  <p>i want to split the output and assigning to variables like</p>
  
  <pre><code>$a='02'
  $b='05'
  </code></pre>
  
  <p>please help me to complete this </p>