We want to use Automic script functions inside a PowerShell script.
However, it does not work as expected.
The Automic function is inside a PowerShell function so, it should only be executed if the PowerShell function is called.
This is not the case, the Automic function is always executed. Do you know if we can prevent this behavior?
c:\>powershell -ExecutionPolicy Unrestricted -File C:\Users\ntd\Downloads\windowsagent\Resources\0001\0001041139\0001041139_0001.ps1 errorOccured value: False errorOccured value: True
I believe that the way you mix Automic script function with PS is not how it work.
You better change your PS function and somehow save it to a PS variable.
Then you can use our :REGISTER_VARIABLE to store the PS value to Automic variable.
Please check the follow links for more detail about External interpreter:
Script element :BEGIN_EXT_INTERPRETERS and :END_EXT_INTERPRETERS
How to use an external interpreter:
Script element :REGISTER_VARIABLE