Trouble invoking powershell command

Hello, I am trying to use powershell with uipath and it’s working. However, I am trying to output the return info of “hostname”. I am not getting the output I expect from hostname that you would get from powershell. Any thoughts on what I need to change?





If you see the output variable type of invoke powershell, it is of type collection. so you need to loop through that to get the outputs inside that. Even it is a single output, you have to loop it using for each or simply you need to provide the index of the value

Make sure your script is assigning a value to the powershell variable. Then make sure in uipath that you have the parameters set up correctly and it is set to ‘out’ parameter. The variable you are assigning looks like it should probably be a string variable

So this is what I have now. When I run the sequence, I get no errors, but my hostname is not outputted. Any ideas why?

Heyy check this @kdrumz,

You need to change the type argument

Currency.xaml (5.6 KB)