Powershell Replace Text In Array Javascript Function