Array in Windows PowerShell Scripts
What is an array in Windows PowerShell scripts?
An array in Windows PowerShell is a simple data structure where pieces of data are stored in as elements in the structure in an ordered sequence. In an array, each element can be identified by the sequence index.
You can create an array of objects by listing its elements using the @(...) syntax as shown below:
For example, the following script creates an array of String objects and assign it to variable $w:
$w = @("Sun","Mon","Tue","Wed","Thu","Fri","Sat") "Week Days:" $w
You can access a member of an array variable using the "[n]" operation, where "n" is the sequence index where the member is located in the array:
$w = @("Sun","Mon","Tue","Wed","Thu","Fri","Sat") "First day of the week is "+$w "Last day of the week is "+$w
2016-10-29, 989👍, 0💬
What is NetZero Toolbar - United Online NetZero dialup toolbar for Internet Explorer (IE) 7 browser?...
How set up "live tv" in Windows Media Center on Windows 7? If you have TV tuner installed on your co...
Can I disable Windows service "IMAPI CD-Burning COM Service" to speedup my computer? Windows service...
Every time I open Internet Explorer a bar pops up saying that it is runner with out add ons. I check...
Pl help me.. Hi.. how to run a php script in windows xp ...? First, you need to download and install...