Bash Loop Through Array Powershell Script Running Slowing