C Sharp Loop Through Array Powershell Version