Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Work an Array in Batches of 5

$
0
0

EDIT :

Think ive found a way to do it in batches of 5….ish… its using this do while loop

to be honest its just an attempt im not quite sure how im going to implement this into my script!


$i = 0
$t = 0
$x = 0
$ary = 1..200
do
{
$x++
do
{
$ary[$t]
$i++
$t++
}
while ($i -lt 5)
write-host "test"
$i = 0
$x=$x+4
}
while ($x -lt $ary.count)


Viewing all articles
Browse latest Browse all 13067

Latest Images

Trending Articles



Latest Images