I'm assuming you are talking about this.
You can always use the Run Script in Guest workflow (not Run script in VM guest) and edit the script inside of a workflow then kick it off. I use that method on occasion when it makes sense (i.e. in a loop that needs the script to change on iteration). I feel the current implementation is going to be as elegant as you are going to get considering how vRO is structured.
So, if I get you correct, you're using the VIX APIs to execue Powershell scripts within your VMs and instead of configuring the scripts in vRO using search & replace you want another solution?
What about building some PowerShell scripts that take input parameters and then using VIX to copy those scripts without any changes to the VMs and then starting them using VIX + passing the variables for the scripts?
This way you atleast get rid of that RegEx stuff. A single VIX script for starting a Powershell script on a VM that takes generic params would be enough for any script you can come up with.