Powershell While Loop Array Javascript Methods Msdn C