Invoke Powershell Script with arguments

Hi I am trying to run a powershell script with uipath. I have found two approaches to run it;

  • Read the script as a text and pass to Invoke Powershell activity
  • Use Run powershell script activity from Script Activities package

Now I need to pass arguments to the powershell script from uipath. Some have mentioned about formatting the string with parameters and invoking the script.

But, rather than that, think we can directly pass parameters from UiPath.

  • In Run Powershell script, it has Parameters as input

  • In Invoke Powershell, it has Parameters under Input section and PowershellVariables under Misc

I have been searching for a while. But still I am unable how to pass parameters using above activities. Little help is really appreciated.

I am trying to send outlook mails using powershell. Still in the process of learning how to work with it. Plz help…:confused:

1 Like

Hi @urweeraratne

These might help you


1 Like

Found one approach from here.

It is based on Invoke Power Shell activity. But still I would like to know how to pass parameters with Run Power Shell script activity.

1 Like

Hi, Did you get any further example? I was looking for something similar.