Run Powershell Actibity never completing

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: