PowerShell Operator does not return any scriptOutput in Process Automation process

Document ID : KB000008664
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

A PowerShell Operator in Process Automation that should return a value does not work.

The scriptOutput returns blank value.

For example:

In a simple PowerShell:

   write-host "hello world"

The script is executed and completed successfully, but the scriptOutput comes blank instead of "hello world".

It works fine with a .cmd or .bat script, however it does not work while using .ps1 (powershells).

Environment:
IT Process automation 4.3.02PowerShell 4 or 5
Cause:

The "oasis.powershell.setexecutionpolicy" parameter in the "OasisConfig.properties" file is not set to true.

Resolution:

Change the parameter that affect the return of the Powershell command output:

Go to "PAM\server\c2o\.config\OasisConfig.properties", then change

from:

oasis.powershell.setexecutionpolicy=false 

to:

oasis.powershell.setexecutionpolicy=true