PowerShell Loop Through Array
In this post, we will look at how to loop through an array in PowerShell. We can define our array as: $myArray = “one”, “two”, “three” And loop through it like below: foreach ($arr in $myArray) { Write-Output $arr } Running this, we get: