Follow this step-by-step process:
- Create a .TXT file containing the desired PowerShell script.
For example, PS_Sample.txt
- In UiPath, use “Read Text File” activity and use the text file in the file name field
- Set the output variable using a string variable as shown-
- Add an “Invoke Power Shell” activity and set the values as shown below-
- Under the properties of “Invoke Power Shell” activity, use the Parameters field to add your arguments.
Hope this helps,
Happy Learning!