Returning powershell output to UIPath

Hello,
How can I communicate PowerShell script output run by “Invoke PowerShell” activity to Uipth and use it and/or further process it in a workflow.

Hi @endyAutou ,

Welcome to the community!

You can get the value back from PowerShell by specifying what kind of data type you expect. I have only tried with string values but with some experimentation you can get values back from PowerShell for complex data types as well.

GetPowerShellOutput.xaml (5.1 KB)

Hope this helps!

Thanks. I will Try it.
I am trying to retrieve an array of output from a PowerShell script run with in UiPtah though.

Hello, did you retrieve the value?

Hi Chaz,

Thanks for your response.

I can just do just one value/variable.

I did not try to it for arrays.

So I just used dictionary object outside of UiPath and output the result to csv file.

Later read the csv file for reporting purpose.

I wish I can send result from PowerShell directly to UiPath to avoid the intermediate step of CSV file

image001.jpg

a very simple prototype on this:


grafik

just configure direction and datatype of the PowerShellVariables settings

Thanks. I will try the prototype.