How To Execute PowerShell Script – In UiPath

powershell.png

There are a lot of commands that every administrator uses in their day-to-day tasks.
What if Uipath has to perform a few tasks using a script and later use it somewhere else?

let’s see how to do that…!!!

SignUp To Get Free UiPath ReFramework Templates

* indicates required

Mandatory: UiPath.Core.Activities package

Example

Implementation using UiPath :

Let us implement a workflow to find the top “N” processes that are consuming the most memory.

(Please ignore the PowerShell script if you don’t understand it, because our goal here is to learn the integration rather than the code)

PowerShell Script(File has been attached in the source code)

UiPath PowerShell script 8

Step 1:
Drag “Input Dialogue” activity into the designer panel to ask the user for his choice and save the user-provided input into a variable.

UiPath PowerShell script 4.PNG

Step 2:
Drag “Invoke Power Shell” activity into the designer panel and supply the required fields as shown below along with the input arguments. i.e ProcessCount here

UiPath PowerShell script 2UiPath PowerShell script 6

Input Parameters:

UiPath PowerShell script 7

Step 3:
Finally, execute the processes 🙂
You should be able to see the results!!!
(You can find the below file at your output file location, provided by you in the PowerShell script)

UiPath PowerShell script 1.PNG

Click here to download the Source Code…

Hope it has helped you…

2 thoughts on “How To Execute PowerShell Script – In UiPath

  1. Manoj Kumar

    Good to see these kinda useful posts…
    Keep up the good work bro.. 🙂

    1. Glad to hear that
      Thanks bro😉🙏🏻

Leave a Reply

%d bloggers like this: