WHen I try to run the following PowerShell it keeps running infinitely without completing.
Does anyone have an idea what is going wrong?
Hi @JMA,
Are you using Invoke PowerShell activity?
Hi @Pablito , No I’m using the UiPath script activies ‘Run PowerShell Script’
I am also trying with the Invoke PowerShell but doing it that way I can not seem to figure out how to capture the output.
I am always getting the error compiler error encountered processing expression: output type PSObject is not defined:
Please take a look on this. Maybe it will help ![]()
Enable “Isscript” and also change to “string”.

Thanks,
Changing the TypeArgument & enabling the IsScript indeed did solve my problem !
@JMA,
I had the same issue in the past, I’m glad I was able to help. Please mark it as solution for others that have the same problem in the future are able to find it. Thank you. ![]()

