Changes

Jump to: navigation, search

Working with Arrays in Windows PowerShell 1.0

31 bytes added, 18:17, 18 March 2009
Accessing Elements in a Windows PowerShell Array
== Accessing Elements in a Windows PowerShell Array ==
<google>ADSDAQBOX_FLOW</google>
Once values have been stored in an array it is highly likely that these values will need to accessed at some later point. This is achieved using the array accessor notation combined with the index into the array of the desired value. The array accessor is simply the array name followed by square brackets. Within the square brackets is placed a number representing the index into the array of the desired element (keeping in mind that the first array element in PowerShell is index 0, not 1). For example, to access the second element of our ''$bookinfo'' array, the following notation would be used:

Navigation menu