Get Array Index Powershell Script Not Running