0
votes

I'm launching a script from Oracle Data Integrator using an OS command.

Long story short: the ps1 script is invoked using powershell.exe -noninteractive script

The problem is that the caller, ODI, does not recognize the termination of the powershell script, where if i call the script in the same way from the console it correctly terminate (and I can eventually read the errorlevel i set as parameter to the exit, that is the last command I wrote in the script).

Has someone had this behaviour of powershell script? It successfully executes but the command remains pending in the task manager (the same command that ran by me in the cmd prompt exit successfully).

1

1 Answers

1
votes

I found the solution, just add < NUL to the caller command:

powershell.exe script.ps1 < NUL