I don\'t have much PowerShell experience yet and am trying to teach myself as I go along.
I\'m trying to make some proof of concept code for a bigger project. The main g
The problem is one of scope; inside your addToArray function change the line to this:
$script:testArray += $Item1
...to store into the array variable you are expecting.