0 votes
1 view
in RPA by (5.3k points)

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 to figure out how to pass parameters using above activities.

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

1 Answer

0 votes
by (9.5k points)

I can suggest you to start by passing  the parameters using Invoke Power Shell activity.

Read the .ps1/.txt file containing the script, with Read Text File activity

Call the Invoke Power Shell activity by passing file content as CommandText and parameters in the Parameter collection.

Related questions

+3 votes
1 answer
asked Jul 2, 2019 in RPA by Abhishek_31 (12.8k points)
0 votes
1 answer
+1 vote
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...