Powershell Loop Through String Javascript Methods Types