Part 2: uipathcli - Setup it on Windows OS
Part 2: uipathcli - Setup it on Windows OS

Part 2: uipathcli - Setup it on Windows OS

Part 1: Part 1: uipathcli - Getting started!

In part 1 of the series I covered introduction about the uipathcli. Now it's time to get started with setting up the environment and get the CLI ready to use.

Install

1?? Navigate to the desired folder where you want to install the uipathcli --> Right Click and click on Open in Terminal


2?? Install uipathcli using PowerShell Script. Enter below script in PowerShell window opened in Step 1.

Invoke-WebRequest "https://github.com/UiPath/uipathcli/releases/latest/download/uipathcli-windows-amd64.zip" -OutFile "uipathcli.zip" ; Expand-Archive -Force -Path "uipathcli.zip" -DestinationPath "."        

It will download the cli in the folder


3?? Add uipathcli file path to Environment Variables PATH


4?? Config the CLI. Once the CLI is installed and ready to use, first thing we have to do is Config it. As explained in previous article, we got 3 options to authenticate - Client Credentials, OAuth Login, Personal Access Token. Here I'm going to show you OAuth Login approach.

For other approaches, refer this documentation: Setup Authentication

First thing we will require is an External Application on Orchestrator. Follow the below steps to setup one quickly:

  1. Go to https://cloud.uipath.com/<your-org>/portal_/admin/external-apps/oauth
  2. Click + Add Application
  3. Fill out the fields:

  • Application Name: <your-app>
  • Application Type: Confidential application
  • + Add Scopes: Add the permissions you want to grant the CLI - I used these scopes:

OR.Assets OR.BackgroundTasks OR.Execution OR.Folders OR.Jobs OR.Machines OR.Settings OR.TestSetExecutions OR.TestSets OR.TestSetSchedules OR.Users.Read        

  • Redirect URL: https://localhost:12700. If get any authorization issue, try removing this.
  • Click Add and note down the app id (clientId) & Secret.

Now back to PowerShell

Type this command to add the authentication in config file for CLI

uipath config        

Enter further details asked on the screen like this:


5?? So we have configured everything and ready to test everything we done till now. To do it let's type below command in PowerShell. This command will return us all the folders available in the tenant.

uipath orchestrator folders get --orderby "DisplayName"        

Here is the result:

You can try some commands from this documentation here: More queries to test


Conclusion

We've reached the conclusion of Part 2, where we set up and tested the CLI. In the final part, I'll walk you through a PowerShell script to list all the triggers scheduled for today. Stay tuned—it's going to be fascinating!

Feel free to connect, share, and discuss. Cheers!

Vinod H??

Digital Transformation @Tech Mahindra | Ex- Accenture | Ex- Infy | Ex- Wipro

1 个月

Insightful Ashok

要查看或添加评论,请登录

Ashok Karale的更多文章

社区洞察

其他会员也浏览了