• Stars
    star
    107
  • Rank 322,037 (Top 7 %)
  • Language
    C#
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

UiPath Orchestrator PowerShell cmdlet library

UiPath Orchestrator PowerShell library

A PowerShell library for interacting with UiPath Orchestrator.

PS C:\>Install-PackageProvider -Name NuGet -Force
PS C:\>Register-PSRepository -Name UiPath -SourceLocation https://www.myget.org/F/uipath-dev/api/v2
PS C:\>Install-Module -Repository UiPath -Name UiPath.Powershell -Force
PS C:\>Import-Module UiPath.PowerShell

Login to UiPath Automation Cloud using interactive login

PS C:\>Get-UiPathAuthToken -Session

Login to UiPath Automation Cloud using API keys

PS C:\>Get-UiPathAuthToken -Session -ClientId <your_client_id> -UserKey <your_user_key>

#Login to your on-premise deployed Orchestrator

PS C:\>Get-UiPathAuthToken -Session -URL <orchestrator_url> -Username <username> -Password <password>

Using the UiPath.PowerShell module

The full documentation is in docs

Use the PowerShell Get-Command to obtain all cmdlets exported by the module:

PS C:\>Get-Command -Module UiPath.PowerShell

You can obtain each command syntax using PowerShell's own Get-Help:

PS C:\>Get-Help Add-UiPathRobot

To start using the library, you need to connect first to a running Orchestrator instance. Use the Get-UiPathAuthToken cmdlet:

PS C:\>Get-UiPathAuthToken -URL <orchestratorurl> -Username <OrchestratorUser> -Password <password> -Session

To connect to an Orchestrator instance using integrated AD and SSO, use the -WindowsCredentials argument to obtain the token. The library will authenticate to Orchestrator as the Windows user running the PowerShell session:

PS C:\>Get-UiPathAuthToken -URL <orchestratorurl> -WindowsCredentials -Session

The -Session flag makes the authentication persist on the PowerShell session for up to 30 minutes. After this you will not have to authenticate again each cmdlet. Some examples:

Use Get-UiPathAuthToken ... -TenantName <tenantName> for multi-tenant Orchetsrator deployments. Use Get-UiPathAuthToken ... -OrganizationUnit <OUName> for Orchetsrator deployments with OrganizationUnits enabled.

If you don't specify any argument, the authentication will be an interactive authentication with the UiPath Cloud service.

PS C:\> Get-UiPathRobot | Format-Table

 Id LicenseKey MachineName    Name           Description
 -- ---------- -----------    ----           -----------

132            RERUSANU       PwdRobot1
133            RERUSANU       PwdRobot2
134            RERUSANU       PwdRobot3

For more example, see the docs

Getting Started

Automated install

Register the UiPath Gallery as a NuGet module provider

The UiPath.PowerShell module can be installed as a NuGet package. You will need to run once these commands first:

PS C:\>Install-PackageProvider -Name NuGet -Force -Scope CurrentUser
PS C:\>Register-PSRepository -Name UiPath -SourceLocation https://www.myget.org/F/uipath-dev/api/v2

Note that in the example above the use of -Scope CurrentUser means that the NuGet package provider is registered only for the current user. This does not require administrative privilegs, but the registration is transient. You may opt instead to run from an elevated prompt and remove the -Scope CurrentUser for a permanent registration.

You can validate that the NuGet package provider and the UiPath Gallery repository are registered:

PS C:\>Get-PackageProvider -Name NuGet

Name                     Version          DynamicOptions
----                     -------          --------------
NuGet                    2.8.5.208        Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag...

PS C:>Get-PSRepository

Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2
UiPath                    Untrusted            https://www.myget.org/F/uipath-dev/api/v2

Install the UiPath.PowerShell module using the UiPath repository

PS C:\>Install-Module -Repository UiPath -Name UiPath.Powershell -Force  -Scope CurrentUser
PS C:\>Import-Module UiPath.PowerShell

This command will download, install and import the UiPath.PowerShell module. Again, you can opt to use a global scope by removing the -Scope CurrentUser argument, but this will require running the command an elevated prompt.

You can validate that the module was downloaded, installed and loaded:

PS c:\>Get-Module UiPath.PowerShell

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     18.3.2.... UiPath.PowerShell                   {Add-UiPathAsset, Add-UiPathEnvironment, Add-UiPathEnviron...

Manual Install

Download the package from https://www.myget.org/feed/uipath-dev/package/nuget/UiPath.PowerShell, extract the content, and then run:

PS c:\>Import-Module UiPath.PowerShell.dll

License

This project is copyright UiPath INC and licensed under the MIT License - see the LICENSE.md file for details.

Prerequisites for building from source

To build the project, In addition to the C# SDK (the solution is Visual Studio 2017 based) you will need autorest. To use the library you won't need anything but the build artifacts.

More Repositories

1

CoreWF

WF runtime ported to work on .NET 6
C#
1,131
star
2

ReFrameWork

Robotic Enterprise Framework Template
342
star
3

Community.Activities

Repository of Windows Workflow Foundation Activities for UiPath Community
C#
233
star
4

uipathcli

Command line interface to simplify, script and automate API calls for UiPath services (preview)
Go
63
star
5

Infrastructure

PowerShell
42
star
6

angular-components

Angular components for r$ch web applications
TypeScript
40
star
7

coreipc

WCF-like service model API for communication over named pipes, TCP and web sockets. .NET and node.js clients.
30
star
8

Chatbot-Samples

Welcome to the UIPath Chatbot samples repository. Here you will find example of using Microsoft BotFramework to build a chatbot that connects to UiPath RPA.
C#
27
star
9

IT-Automation-Workflow-Solutions

RPA Workflow Solutions built with UiPath's official IT Automation activities
PowerShell
16
star
10

AppsClientSample

Sample for wrapping a UiPath app in a windows client side exe
JavaScript
13
star
11

Orchestrator-CredentialStorePlugins

Credential Store Plugins as examples on how to create third party plugins to use on the Orchestrator.
C#
13
star
12

OrchestratorManager

A tool for managing Orchestrator entities in bulk.
HTML
11
star
13

assistant-plugin-creator

TypeScript
10
star
14

codedautomations-samples

Samples for UiPath Coded Automations
C#
9
star
15

orchestrator-nodejs

JavaScript
8
star
16

ai-customer-scripts

Shell
8
star
17

ProcessMining-pm-utils

Utility functions for process mining related dbt projects.
7
star
18

Document-Processing-Code-Samples

Code samples for document processing activities.
6
star
19

Workflow-Inspector

A tool for evaluating UiPath Studio projects according to the best practices of workflow development.
5
star
20

Squirrel.Windows

An installation and update framework for Windows desktop apps
C++
5
star
21

AmazonConnect

Fulfill Amazon Connect contact flows with unattended UiPath automation
JavaScript
4
star
22

Insights-Customer

PowerShell
4
star
23

aws-quickstart-automation-suite

Python
4
star
24

robot-docker

Docker images for UiPath Robot on Linux
Dockerfile
4
star
25

GenesysCloud

Launch UiPath automation from a Genesys Cloud Architect flow
3
star
26

platform-quickstart

PowerShell
2
star
27

apollo-lab-public

Public Storybook for Apollo Lab
2
star
28

du-customer-scripts

Public repo with customer facing scripts for DU related projects.
Python
1
star
29

ProcessMining-devkit-connector

Template to quick start the development of a new connector containing a simple procurement example on how to write transformations.
1
star
30

var-assets

1
star
31

vsts-task-lib

Libraries for writing VSTS and TFS build tasks
TypeScript
1
star
32

automation-suite-support-tools

Repository to host commonly used troubleshooting scripts
Shell
1
star
33

mobile-automation-samples

Sample applications and workflow for UiPath's Mobile Automation activities package
Java
1
star