I have a PowerShell script which needs to invoked via controlM. Sample invocation looks like
powershell -NoLogo -NonInteractive -Command "D:\path\to\Whatever.ps1 -param1 %%PARAM1 -param2 %%PARAM2"
The value for param2 is a CSV like '1111111,2222222' and typically spans nearly .5 million chars long.
Issue: There is a limitation in controlM that a max of 4000 chars can be set for a variable via the controlM interface.
So, the workaround I can think of is to have a wrapper script (which will now be hooked to controlM instead) which will invoke Whatever.ps1
after reading config file. Something like:
sample.ini
:
[General] param1=value1 param2='1111111,2222222'
But I am not sure if writing a wrapper script, consume the log output from exising Whatever.ps1
etc. is the best idea.
So, just wondering if there is a way so that values from the config file can be directly fed to Whatever.ps1
. Something like
powershell -NoLogo -NonInteractive -Command "D:\path\to\Whatever.ps1 -param1 sample.ini[param2] -param2 sample.ini[param2]"