PowerShell – Looping
There may be a situation when you need to execute a block of law several number of times. In general, statements are executed succession ally The first statement in a function is executed first, followed by the alternate, and so on. Programming languages give colorful control structures that allow for more complicated prosecution paths. A circle statement allows us to execute a statement or group of statements multiple times and following is the general form of a circle statement in utmost of the programming languages − For loop – Execute a sequence of statements multiple times and abbreviates the code that manages the loop variable. > $array = @(“item1”, “item2”, “item3”) > for($i = 0; $i -lt $array.length; $i++){ $array[$i] } item1 item2 item3 … Read more