I am using powershell to call an executable app.exe
.
I can call app.exe
with a parameter myparam
multiple times - so this would be a valid call from within powershell:
& app.exe --myparam 1 --myparam 2 --myparam 3
However, in my scenario I do not know how many instances of myparam
I need to pass to app.exe
until runtime.
If I wanted to dynamically pass parameters with different names I am aware that I could use splatting - but this doesn't work for me because I cannot add multiple instances of the key myparam
to the hash table.