Where to set the variable ${filename} required to use a script in OpManager

Where to set the variable ${filename} required to use a script in OpManager

Hi all,

I need to manipulate some OIDs and hence I'm preparing a script in powershell.

I correctly expressed the executable path and name in the way PATH\${filename}.ps1 but when I test it OpManagers complains that PATH\OpManager_903_1463997551056.ps1does not exist.

Moreover that string changes everytime and my understanding its value is derived on-the-fly because the variable ${filename} is not initialized. I thought filename would be taken from the name of the script.

So my question is: how can I initialize or how that variable is initialized? From where the real value is taken from?
Or as a general rule, from where the values of the many variables are taken/initialized?

I refer to this type of template

https://image.slidesharecdn.com/scriptmonitoring-111123063949-phpapp02/95/script-monitoring-6-1024.jpg?cb=1322096868

Now it's more than a week that I'm struggling with it

MTIA, Fabio


P.S.
Out of curiosity, could you explain why OpManager must know the body of the scripts and doesn't rely just on the output (correctly formatted as explained in the right box) :-)

                New to ADSelfService Plus?