Powershell Loop Through String Javascript Substring From Right