![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) | ||||||||||||
| Guest | Re: Creating array Arrays in Powershell are great, since they are determined to be an array at the time that the variable is populated. In short, you don't have to do anything different. Based on the information you've provided: $names = "test1","test2","test3" Creates an array called "$names", and populates elements 0 through 2. you can reference the elements in the array like this: $names[0] (produces "test1") $names[1] (produces "test2") etc. To enumerate through them, you could do something like: foreach ($name in $names) {$name} and it will output: test1 test2 test3 Hope this helped. _M_Simmons_ "Rajeev" <s.rajeev3@xxxxxx> wrote in message news:63fe9261-b259-490d-9606-4bd28f88a5af@xxxxxx
| ||||||||||||
My System Specs![]() | |||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: Creating array | Shay Levi | PowerShell | 2 | 12-26-2007 01:31 PM |
| Re: Creating array | Shay Levi | PowerShell | 0 | 12-26-2007 07:41 AM |
| Re: Creating array | Shay Levi | PowerShell | 0 | 12-26-2007 07:23 AM |
| Creating a byte array | Thomas Lee | PowerShell | 5 | 03-06-2007 03:30 AM |
| Creating an array | Marco Shaw | PowerShell | 1 | 11-07-2006 10:20 PM |