You are not logged in.
I apologize for the noob question: How would I translate something like this to powershell?
for /l %X in (1,1,6) do ...
I see from get-help foreach -examples that I can create an array and then process each item, but how to do it with just signifying "start, step,end" like MS-DOS?
PS C:\> 1,2,3,4,5,6 | foreach-object -process {$_*2}
2
4
6
8
10
12
Offline
use the range operator
http://ss64.com/ps/syntax-arrays.html
PS C:\> 1,2,3,(5..9) | foreach-object -process {$_*2}
Offline
Ah, yes. Thank you. I also just found the range operator in "get-help array" Thanks again!
Offline