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