Powershell Loop Through String Javascript Functions And Events