concept range operator in category powershell
appears as: rge operator

This is an excerpt from Manning's book Windows PowerShell in Action, Third Edition.
The foreach statement iterates over a collection of objects, and the range operator is a way to generate a sequence of numbers. The two combine to make looping over a sequence of numbers a very clean operation.
There’s one other tool in the indexing toolkit: the range operator discussed in the previous section. This operator is a convenient way to get slices of arrays. Say you have an array of ten elements, with values 0–9. To get the first four elements of an array, you can use the range operator as follows: