Powershell Output Error

Hi @Zoya

Please see this sample project for some clues:
PowerShellExample.zip (2.5 KB)

image

Basically, the type you set in the properties always ends up as a collection of that type:

So to get the result, you have to loop through the elements or at least give it an index, for example:
output(0).ToString

In this particular example, the powershell command will return two elements with different types and the Object is necessary. The rest of the logic makes sure that the types will be handled in appropriate way.

I hope it is helpful :slight_smile:

Hi @Zoya
I think in your case all is in good way. Try to use output as Text(0).ToString instead of Text.ToString.

Hi Pablito,

Thanks a lot for your help

It is working now.

Regards

1 Like

Hi Maciej,

Thanks alot for your help.

I used the output directly and it’s working now.

Regards

2 Likes