title: Convert string to int array in PowerShell
body: <p>I'm trying to convert a string that looks like this,</p>
  
  <pre><code>    2,3,4,5,6,20..30
  </code></pre>
  
  <p>to an array of integers. Here is the code I currently have:</p>
  
  <pre><code>[string]$a = "2,3,4,5,6,7"
  [array]$b = $a.split(",")
  [array]$c = foreach($number in $b) {([int]::parse($number))}
  </code></pre>
  
  <p>Which works, but not for the range of 20..30. How do I get that part working?</p>