Powershell Loop Through String Javascript Methods And Functions