UiPath DevOps PowerShell Scripts Guide
UiPath DevOps PowerShell Scripts Guide
Package, deploy, run automations, run tests, manage assets, and analyze automatin projects.
Youtube Video The video was created when the library was first released, so it does not include
any features added afterward.
Overview
More and more customers are requesting integrations of uipath platform to other platforms like
GitLab and Circle CI and UiPath is not able to create native plugins for all of them.
This unofficial library of DevOps PowerShell scripts will support customers to facilitate the
interaction with the offical UiPath CLI to integrate CI/CD into their workflows and allow them to
package, deploy and run automations and tests.
Prerequisite:
● The provisioned vm or agent should be a window machine
● Add a step in your CI/CD pipepline to download the descired scripts. (Download only the
scripts you need, for example if you want to Pack an RPA project then download
UiPathPack script) Use the scripts below as one step in your pipeline and give at any name
(e.g. "Preparing Environment")
It is recommended to download copy of the scripts from the scripts folder into your own repository
#Create scripts folder under C drive. (you can change the directory path )
New-Item -Path "C:\\" -ItemType "directory" -Name "scripts";
Invoke-WebRequest "[Link]
-OutFile "C:\\scripts\\UiPathPack.ps1";
Invoke-WebRequest "[Link]
-OutFile "C:\\scripts\\UiPathDeploy.ps1";
Invoke-WebRequest "[Link]
-OutFile "C:\\scripts\\UiPathJobRun.ps1";
Invoke-WebRequest "[Link]
-OutFile "C:\\scripts\\UiPathRunTest.ps1";
Invoke-WebRequest
"[Link] -OutFile
"C:\\scripts\\UiPathManageAssets.ps1";
Invoke-WebRequest
"[Link] -OutFile
"C:\\scripts\\UiPathAnalyzeProject.ps1";
Invoke-WebRequest
"[Link] -OutFile
"C:\\scripts\\UiPathCLIGeneric.ps1";
You can't create directory outside your CI/CD privisioned machine?
Powershell Scripts
Five available scripts can be utilized
Script Description
UiPathCLIGeneric This script is designed for those who know how to work
with [Link] and would like to call the cli directly. This
script will pass the provided parameters as is directly to
[Link].
Logging
Each script will log all output to its own *.log file and sometimes to the console.
Dependency
The scripts will automatically download the [Link] during the runtime.
● Official UiPath CLI
● UiPath CLI prerequesites: .NET 6.0.7, that must include .NET 6.0.7 Desktop Runtime, that
come with the 6.0.302 SDK.
UiPathPack
Pack one or more projects into a package.
SYNTAX
. 'C:\scripts\UiPathPack.ps1' <project_path> -o <destination_folder> [-version <version>] [-autoVersion] [-outputType
<Process|Library|Tests|Objects>] [-libraryOrchestratorUrl <orchestrator_url> -libraryOrchestratorTenant
<orchestrator_tenant>] [-libraryOrchestratorUsername <orchestrator_user> -libraryOrchestratorPassword
<orchestrator_pass>] [-libraryOrchestratorUserKey <auth_token> -libraryOrchestratorAccountName <account_name>]
[-libraryOrchestratorAccountForApp <ExternaAppAccount> -libraryOrchestratorApplicationId <AppID>
-libraryOrchestratorApplicationSecret <AppSecret> -libraryOrchestratorApplicationScope <AppScope>]
[-libraryOrchestratorFolder <folder>] [-language <language>] [-uipathCliFilePath <uipcli_path>]
Examples:
. 'C:\scripts\UiPathPack.ps1' "C:\UiPath\Project\[Link]" -destination_folder "C:\UiPath\Package"
. 'C:\scripts\UiPathPack.ps1' "C:\UiPath\Project\[Link]" -destination_folder "C:\UiPath\Package" -version
1.0.6820.22047
. 'C:\scripts\UiPathPack.ps1' "C:\UiPath\Project\[Link]" -destination_folder "C:\UiPath\Package" -autoVersion
. 'C:\scripts\UiPathPack.ps1' "C:\UiPath\Project" -destination_folder "C:\UiPath\Package"
. 'C:\scripts\UiPathPack.ps1' "C:\UiPath\Project\[Link]" -destination_folder "C:\UiPath\Package" -outputType
Tests -language en-US
#Note: if the script folder location is different, you need to replace "C:" with directory folder (e.g.
'[FOLDER_VARIABLE]\scripts\UiPathPack.ps1')
if running on self-hosted agent and UiPath CLI is available on the agent machine, provide
-uipathCliFilePath
Examples:
. 'C:\scripts\UiPathPack.ps1' "C:\UiPath\Project\[Link]" -destination_folder "C:\UiPath\Package"
-uipathCliFilePath "C:\uipathcli\[Link]"
More on different authentication options here UiPathAuthenticationsOptions
Script Parameters
● project_path Required. Path to a [Link] file or a folder containing [Link] files.
● destination_folder Required. Destination folder.
● libraryOrchestratorUrl (Optional, useful only for libraries) The Orchestrator URL.
● libraryOrchestratorTenant (Optional, useful only for libraries) The Orchestrator tenant.
● libraryOrchestratorUsername (Optional, useful only for libraries) The Orchestrator
password used for authentication. Must be used together with the username.
● libraryOrchestratorPassword (Optional, useful only for libraries) The Orchestrator
username used for authentication. Must be used together with the password.
● libraryOrchestratorUserKey (Optional, useful only for libraries) The Orchestrator OAuth2
refresh token used for authentication. Must be used together with the account name and
client id.
● libraryOrchestratorAccountName (Optional, useful only for libraries) The Orchestrator
CloudRPA account name. Must be used together with the refresh token and client id.
● libraryOrchestratorAccountForApp (Optional, useful only for libraries) The Orchestrator
CloudRPA account name. Must be used together with id, secret and scope(s) for external
application.
● libraryOrchestratorApplicationId (Optional, useful only for libraries) The external
application id. Must be used together with account, secret and scope(s) for external
application.
● libraryOrchestratorApplicationSecret (Optional, useful only for libraries) The external
application secret. Must be used together with account, id and scope(s) for external
application.
● libraryOrchestratorApplicationScope (Optional, useful only for libraries) The
space-separated list of application scopes. Must be used together with account, id and
secret for external application.
● libraryOrchestratorFolder (Optional, useful only for libraries) The Orchestrator folder
(organization unit).
● version Package version.
● autoVersion Auto-generate package version.
● outputType Force the output to a specific type. <Process|Library|Tests|Objects>
● language The orchestrator language.
● disableTelemetry Disable telemetry data.
● uipathCliFilePath if not provided, the script will auto download the cli from uipath public
feed. the script was tested on version 23.10.8753.32995
● SpecificCLIVersion CLI version to auto download if uipathCliFilePath not provided. Default
is "23.10.8753.32995" where the script was last tested.
UiPathDeploy
Deploy packages to an Orchestrator instance, optionally publishing them to a set of environments.
SYNTAX
. 'C:\scripts\\UiPathDeploy.ps1' <packages_path> <orchestrator_url> <orchestrator_tenant> [-orchestrator_user
<orchestrator_user> -orchestrator_pass <orchestrator_pass>] [-UserKey <auth_token> -account_name
<account_name>] [-accountForApp <account_for_app> -applicationId <application_id> -applicationSecret
<application_secret> -applicationScope <applicationScope>] [-folder_organization_unit <folder_organization_unit>]
[-entryPoints [Link]][-environment_list <environment_list>] [-language <language>] [-uipathCliFilePath
<uipcli_path>]
Examples:
. 'C:\scripts\UiPathDeploy.ps1' "C:\UiPath\Project 1" "[Link] default
-orchestrator_user admin -orchestrator_pass 123456
. 'C:\scripts\UiPathDeploy.ps1' "C:\UiPath\Project\[Link]"
"[Link] default -orchestrator_user admin -orchestrator_pass 123456
-folder_organization_unit OurOrganization
. 'C:\scripts\UiPathDeploy.ps1' "C:\UiPath\Project\[Link]"
"[Link] default -orchestrator_user admin -orchestrator_pass 123456 -environment_list
SAPEnvironment,ExcelAutomationEnvironment -language en-US
. 'C:\scripts\UiPathDeploy.ps1' "C:\UiPath\Project\[Link]"
"[Link] default -UserKey a7da29a2c93a717110a82 -account_name myAccount
. 'C:\scripts\UiPathDeploy.ps1' "C:\UiPath\Project\[Link]"
"[Link] default -accountForApp myAccountForExternalApp -applicationId
myExternalAppId -applicationSecret myExternalAppSecret -applicationScope "[Link] [Link]"
. 'C:\scripts\UiPathDeploy.ps1' "C:\UiPath\Project\[Link]"
"[Link] default -orchestrator_user admin -orchestrator_pass 123456 -environment_list
SAPEnvironment,ExcelAutomationEnvironment -language en-US -entryPoints EntryPoint1,EntryPoint2
#Note: if script path is different you need to replace C: with directory folder (e.g.
'[FOLDER_VARIABLE]\scripts\UiPathPack.ps1')
if running on self-hosted agent and UiPath CLI is available on the agent machine, provide
-uipathCliFilePath
Examples:
. 'C:\scripts\UiPathDeploy.ps1' "C:\UiPath\Project 1" "[Link] default
-orchestrator_user admin -orchestrator_pass 123456 -uipathCliFilePath "C:\uipathcli\[Link]"
More on different authentication options here UiPathAuthenticationsOptions
Script Parameters
● packages_path Required. The path to a folder containing packages, or to a package file.
● orchestrator_url Required. The URL of the Orchestrator instance.
● orchestrator_tenant Required. The tenant of the Orchestrator instance.
● orchestrator_user Required. The Orchestrator username used for authentication. Must be
used together with the password.
● orchestrator_pass Required. The Orchestrator password used for authentication. Must be
used together with the username
● UserKey Required. The Orchestrator OAuth2 refresh token used for authentication. Must be
used together with the account name and client id.
● account_name Required. The Orchestrator CloudRPA account name. Must be used together
with the refresh token and client id.
● accountForApp The Orchestrator CloudRPA account name. Must be used together with id,
secret and scope(s) for external application.
● applicationId The external application id. Must be used together with account, secret and
scope(s) for external application.
● applicationSecret The external application secret. Must be used together with account, id
and scope(s) for external application.
● applicationScope The space-separated list of application scopes. Must be used together
with account, id and secret for external application.
● folder_organization_unit The Orchestrator folder (organization unit).
● entryPoints Define the specific entry points to create or update a process. This is the
filePath of the entry point starting from the root of the project. For classic folders only one
entry point can be specified, for each environment it will be created or updated a process
with the specified entry point.
● environment_list The comma-separated list of environments to deploy the package to. If
the environment does not belong to the default folder (organization unit) it must be prefixed
with the folder name, e.g. AccountingTeam\TestEnvironment
● language The orchestrator language.
● disableTelemetry Disable telemetry data.
● uipathCliFilePath if not provided, the script will auto download the cli from uipath public
feed. the script was tested on version 23.10.8753.32995
● SpecificCLIVersion CLI version to auto download if uipathCliFilePath not provided. Default
is "23.10.8753.32995" where the script was last tested.
UiPathJobRun
Trigger a job on Orchestrator
SYNTAX
. 'C:\scripts\UiPathJobRun.ps1' <process_name> <orchestrator_url> <orchestrator_tenant> [-input_path
<input_path>] [-jobscount <jobscount>] [-result_path <result_path>] [-priority <priority>] [-robots <robots>]
[-fail_when_job_fails <do_not_fail_when_job_fails>] [-timeout <timeout>] [-wait <do_not_wait>] [-orchestrator_user
<orchestrator_user> -orchestrator_pass <orchestrator_pass>] [-userKey <auth_token> -accountName
<account_name>] [-accountForApp <account_for_app> -applicationId <application_id> -applicationSecret
<application_secret> -applicationScope <applicationScope>] [-folder_organization_unit <folder_organization_unit>]
[-language <language>] [-user <robotUser>] [-machine <robotMachine>] [-job_type <Unattended, NonProduction>]
[-uipathCliFilePath <uipcli_path>]
Example 1:
#Note: if script folder location is different you need to replace C: with directory folder (e.g.
'[FOLDER_VARIABLE]\scripts\UiPathPack.ps1')
if running on self-hosted agent and UiPath CLI is available on the agent machine, provide
-uipathCliFilePath
Examples:
. 'C:\scripts\UiPathJobRun.ps1' "ProcessName" "[Link] default -orchestrator_user
admin -orchestrator_pass 123456 -uipathCliFilePath "C:\uipathcli\[Link]"
More on different authentication options here UiPathAuthenticationsOptions
Script Parameters
● processName orchestrator process name to run.
● uriOrch The URL of Orchestrator.
● tenantlName The tenant name
● orchestrator_user On-premises Orchestrator admin user name who has a Role of Create
Package.
● orchestrator_pass The password of the on-premises Orchestrator admin user.
● userKey User key for Cloud Platform Orchestrator
● accountName Account logical name for Cloud Platform Orchestrator
● accountForApp The Orchestrator CloudRPA account name. Must be used together with id,
secret and scope(s) for external application.
● applicationId The external application id. Must be used together with account, secret and
scope(s) for external application.
● applicationSecret The external application secret. Must be used together with account, id
and scope(s) for external application.
● applicationScope The space-separated list of application scopes. Must be used together
with account, id and secret for external application.
● input_path Client ID for Cloud Platform Orchestrator
● input_path The full path to a JSON input file. Only required if the entry-point workflow has
input parameters.
● jobscount The number of job runs. (default 1)
● result_path The full path to a JSON file or a folder where the result json file will be created.
● priority The priority of job runs. One of the following values: Low, Normal, High. (default
Normal)
● robots The comma-separated list of specific robot names.
● folder_organization_unit The Orchestrator folder (organization unit).
● user The name of the user. This should be a machine user, not an orchestrator user. For
local users, the format should be MachineName\UserName
● language The orchestrator language.
● machine The name of the machine.
● timeout The timeout for job executions in seconds. (default 1800)
● fail_when_job_fails The command fails when at least one job fails. (default true)
● wait The command waits for job runs completion. (default true)
● job_type The type of the job that will run. Values supported for this command: Unattended,
NonProduction. For classic folders do not specify this argument
● disableTelemetry Disable telemetry data.
● uipathCliFilePath if not provided, the script will auto download the cli from uipath public
feed. the script was tested on version 23.10.8753.32995
● SpecificCLIVersion CLI version to auto download if uipathCliFilePath not provided. Default
is "23.10.8753.32995" where the script was last tested.
UiPathRunTest
Tests a given package or runs a test set.
SYNTAX
. 'C:\scripts\UiPathRunTest.ps1' <orchestrator_url> <orchestrator_tenant> [-input_path <input_path>] [-project_path
<package>] [-testset <testset>] [-orchestrator_user <orchestrator_user> -orchestrator_pass <orchestrator_pass>]
[-UserKey <auth_token> -account_name <account_name>] [-accountForApp <account_for_app> -applicationId
<application_id> -applicationSecret <application_secret> -applicationScope <applicationScope>] [-environment
<environment>] [-folder_organization_unit <folder_organization_unit>] [-language <language>] [-uipathCliFilePath
<uipcli_path>]
Examples:
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -orchestrator_user admin -orchestrator_pass 123456 -testset "MyRobotTests"
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -orchestrator_user admin -orchestrator_pass 123456 -project_path "C:\UiPath\Project\[Link]"
-environment TestingEnv
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -orchestrator_user admin -orchestrator_pass 123456 -project_path "C:\UiPath\Project\[Link]"
-folder_organization_unit MyFolder
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -orchestrator_user admin -orchestrator_pass 123456 -project_path "C:\UiPath\Project\[Link]"
-folder_organization_unit MyFolder -environment MyEnvironment
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -accountForApp myAccountForExternalApp -applicationId myExternalAppId -applicationSecret
myExternalAppSecret -applicationScope "[Link] [Link]" -testset "MyRobotTests"
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -UserKey a7da29a2c93a717110a82 -account_name myAccount -testset "MyRobotTests"
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -UserKey a7da29a2c93a717110a82 -account_name myAccount -project_path "C:\UiPath\Project\[Link]"
-environment TestingEnv --out junit
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -UserKey a7da29a2c93a717110a82 -account_name myAccount -project_path "C:\UiPath\Project\[Link]"
-environment TestingEnv -result_path "C:\[Link]" -out uipath -language en-US
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -UserKey a7da29a2c93a717110a82 -account_name myAccount -project_path "C:\UiPath\Project\[Link]"
-environment TestingEnv -result_path "C:\[Link]" -input_path "C:\UiPath\Project\[Link]" -out uipath
-language en-US
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -UserKey a7da29a2c93a717110a82 -account_name myAccount -project_path "C:\UiPath\Project\[Link]"
-environment TestingEnv -result_path "C:\[Link]" -input_path "C:\UiPath\Project\[Link]" -out uipath
-language en-US -attachRobotLogs "true"
#Note: if script folder location is different you need to replace C: with directory folder (e.g.
'[FOLDER_VARIABLE]\scripts\UiPathPack.ps1')
if running on self-hosted agent and UiPath CLI is available on the agent machine, provide
-uipathCliFilePath
Examples:
. 'C:\scripts\UiPathRunTest.ps1' -orchestrator_url "[Link] -orchestrator_tenant
default -orchestrator_user admin -orchestrator_pass 123456 -testset "MyRobotTests" -uipathCliFilePath
"C:\uipathcli\[Link]"
More on different authentication options here UiPathAuthenticationsOptions
Script Parameters
● project_path The path to a test package file.
● testset The name of the test set to execute. The test set should use the latest version of
the test cases. If the test set does not belong to the default folder (organization unit) it must
be prefixed with the folder name, e.g. AccountingTeam\TestSet
● orchestrator_url Required. The URL of the Orchestrator instance.
● orchestrator_tenant Required. The tenant of the Orchestrator instance.
● result_path Results file path
● accountForApp The Orchestrator CloudRPA account name. Must be used together with id,
secret and scope(s) for external application.
● applicationId The external application id. Must be used together with account, secret and
scope(s) for external application.
● applicationSecret The external application secret. Must be used together with account, id
and scope(s) for external application.
● applicationScope The space-separated list of application scopes. Must be used together
with account, id and secret for external application.
● orchestrator_user Required. The Orchestrator username used for authentication. Must be
used together with the password.
● orchestrator_pass Required. The Orchestrator password used for authentication. Must be
used together with the username
● UserKey Required. The Orchestrator OAuth2 refresh token used for authentication. Must be
used together with the account name and client id.
● account_name Required. The Orchestrator CloudRPA account name. Must be used together
with the refresh token and client id.
● folder_organization_unit The Orchestrator folder (organization unit).
● environment The environment to deploy the package to. Must be used together with the
project path. Required when not using a modern folder.
● timeout The time in seconds for waiting to finish test set executions. (default 7200)
● out Type of result file
● language The orchestrator language.
● disableTelemetry Disable telemetry data.
● uipathCliFilePath if not provided, the script will auto download the cli from uipath public
feed. the script was tested on version 23.10.8753.32995
● SpecificCLIVersion CLI version to auto download if uipathCliFilePath not provided. Default
is "23.10.8753.32995" where the script was last tested.
● attachRobotLogs Attaches Robot Logs for each testcases along with Junit Test Report.
● repositoryUrl Repository url where project is versioned.
● repositoryCommit Repository commit where the project was built from.
● repositoryBranch Repository branch where the project was built from.
● repositoryType VCS system repository type.
● projectUrl Automation Hub idea URL.
● identityUrl Url of your identity server. This is only required for PaaS deployments.
UiPathManageAssets
Manage uipath orchestrator assets. - Delete assets from an Orchestrator instance (based on asset
name). - Deploy assets to an Orchestrator instance.
SYNTAX
. 'C:\scripts\UiPathManageAssets.ps1' <operation> <assets_file.csv> <orchestrator_url> <orchestrator_tenant>
[-accountForApp <account_for_app> -applicationId <application_id> -applicationSecret <application_secret>
-applicationScope <applicationScope>] [-orchestrator_user <orchestrator_user> -orchestrator_pass
<orchestrator_pass>] [-UserKey <auth_token> -account_name <account_name>] [-folder_organization_unit
<folder_organization_unit>] [-language <language>] [-uipathCliFilePath <uipcli_path>]
#Note: if script folder location is different you need to replace C: with directory folder (e.g.
'[FOLDER_VARIABLE]\scripts\UiPathPack.ps1')
if running on self-hosted agent and UiPath CLI is available on the agent machine, provide
-uipathCliFilePath
Examples:
. 'C:\scripts\UiPathManageAssets.ps1' deploy assets_file.csv "[Link] defaultTenant
-orchestrator_user admin -orchestrator_pass 123456 -uipathCliFilePath "C:\uipathcli\[Link]"
More on different authentication options here UiPathAuthenticationsOptions
Script Parameters
● $operation Manage assets operation either 'delete' or 'deploy'
$assets_file The following is a sample csv file. The column names are required! Only the first
column is used but you need to at least have empty columns in place.
name,type,value,description
UiPathPack
Check project(s) for workflow analyzer violations
SYNTAX
. 'C:\scripts\UiPathAnalyzeProject.ps1' <project_path> [-analyzerTraceLevel <analyzer_trace_level>]
[-stopOnRuleViolation <true|false>] [-treatWarningsAsErrors <true|false>] [-saveOutputToFile] [-ignoredRules
<activity_1_id,activity_2_id,activity_3_id,activity_4_id>] [-orchestratorUrl <orchestrator_url> -orchestratorTenant
<orchestrator_tenant>] [-orchestratorUsername <orchestrator_user> -orchestratorPassword <orchestrator_pass>]
[-orchestratorAuthToken <auth_token> -orchestratorAccountName <account_name>] [-orchestratorFolder <folder>]
[-uipathCliFilePath <uipcli_path>]
Examples:
. 'C:\scripts\UiPathAnalyzeProject.ps1' "C:\UiPath\Project\[Link]"
. 'C:\scripts\UiPathAnalyzeProject.ps1' "C:\UiPath\Project\[Link]" -analyzerTraceLevel "Error"
. 'C:\scripts\UiPathAnalyzeProject.ps1' "C:\UiPath\Project\[Link]" -analyzerTraceLevel "Error"
-stopOnRuleViolation true
. 'C:\scripts\UiPathAnalyzeProject.ps1' "C:\UiPath\Project\[Link]" -analyzerTraceLevel "Error"
-stopOnRuleViolation true -treatWarningsAsErrors true
. 'C:\scripts\UiPathAnalyzeProject.ps1' "C:\UiPath\Project\[Link]" -analyzerTraceLevel "Error"
-stopOnRuleViolation true -treatWarningsAsErrors true -resultPath "C:\UiPath\Project\[Link]"
. 'C:\scripts\UiPathAnalyzeProject.ps1' "C:\UiPath\Project\[Link]" -analyzerTraceLevel "Error"
-stopOnRuleViolation true -treatWarningsAsErrors true -resultPath "C:\UiPath\Project\[Link]" -ignoredRules
"ST-NMG-009,ST-DBP-020,UI-USG-011,ST-DBP-020"
. 'C:\scripts\UiPathAnalyzeProject.ps1' "C:\UiPath\Project\[Link]" -analyzerTraceLevel "Error"
-stopOnRuleViolation true -treatWarningsAsErrors true -resultPath "C:\UiPath\Project\[Link]" -ignoredRules
"ST-NMG-009,ST-DBP-020,UI-USG-011,ST-DBP-020" -orchestratorUrl "[Link]
-orchestratorTenant "default" -orchestratorUsername "username" -orchestratorPassword "\_ye5zG9(x"
-orchestratorAuthToken "AuthToken" -orchestratorAccountName "AccountName" -orchestratorFolder
"OrchestratorFolder"
#Note: if the script folder location is different, you need to replace "C:" with directory folder (e.g.
'[FOLDER_VARIABLE]\scripts\UiPathPack.ps1')
if running on self-hosted agent and UiPath CLI is available on the agent machine, provide
-uipathCliFilePath
Examples:
. 'C:\scripts\UiPathAnalyzeProject.ps1' "C:\UiPath\Project\[Link]" -analyzerTraceLevel "Error"
-uipathCliFilePath "C:\uipathcli\[Link]"
More on different authentication options here UiPathAuthenticationsOptions
Script Parameters
● project_path Required. Path to a [Link] file or a folder containing [Link] files.
● analyzerTraceLevel Specifies what types of messages to output
(Off|Error|Warning|Info|Verbose).
● stopOnRuleViolation Fail the job when any rule is violated.
● treatWarningsAsErrors Treat warnings as errors.
● resultPath The full path to a JSON file where the result json file will be created. Otherwise
print it to the standard console.
● ignoredRules (Default: ) A comma-separated list of rules to be ignored by the analysis
procedure.
● orchestratorUsername (Optional, useful only for additional package feeds) The Orchestrator
username used for authentication. Must be used together with the password.
● orchestratorPassword (Optional, useful only for additional package feeds) The Orchestrator
password used for authentication. Must be used together with the username.
● orchestratorAuthToken (Optional, useful only for additional package feeds) The
Orchestrator OAuth2 refresh token used for authentication. Must be used together with the
account name and client id.
● orchestratorAccountName (Optional, useful only for additional package feeds) The
Orchestrator CloudRPA account name. Must be used together with the refresh token and
client id.
● orchestratorAccountForApp (Optional, useful only for additional package feeds) The
Orchestrator CloudRPA account name. Must be used together with id, secret and scope(s)
for external application.
● orchestratorApplicationId (Optional, useful only for additional package feeds) The
external application id. Must be used together with account, secret and scope(s) for external
application.
● orchestratorApplicationSecret (Optional, useful only for additional package feeds) The
external application secret. Must be used together with account, id and scope(s) for external
application.
● orchestratorApplicationScope (Optional, useful only for additional package feeds) The
space-separated list of application scopes. Must be used together with account, id and
secret for external application.
● orchestratorFolder (Optional, useful only for additional package feeds) The Orchestrator
folder (organization unit).
● orchestratorUrl (Optional, useful only for additional package feeds) The Orchestrator URL.
● orchestratorTenant (Optional, useful only for additional package feeds) The Orchestrator
tenant.
● uipathCliFilePath if not provided, the script will auto download the cli from uipath public
feed. the script was tested on version 23.10.8753.32995
● SpecificCLIVersion CLI version to auto download if uipathCliFilePath not provided. Default
is "23.10.8753.32995" where the script was last tested.
UiPathCLIGeneric
This script is designed for those who know how to work with [Link] and would like to call
the cli directly. This script will pass the provided parameters as is directly to [Link].
SYNTAX
. 'C:\scripts\UiPathCLIGeneric.ps1' <uipcli desired arguments>
Examples:
. 'C:\scripts\UiPathCLIGeneric.ps1' package pack "C:\UiPath\Project\[Link]" -o "C:\UiPath\Package"
. 'C:\scripts\UiPathCLIGeneric.ps1' job run ProcessName "[Link] default -u admin
-p 123456
. 'C:\scripts\UiPathCLIGeneric.ps1' robot connect machine-name "[Link] default -u
admin -p 123456 -o OurOrganization -l en-US
. 'C:\scripts\UiPathCLIGeneric.ps1' machine provision MachineNameExample Template
"[Link] default -u admin -p 123456 -o ModernFolder -l en-US
. 'C:\scripts\UiPathCLIGeneric.ps1'app install Studio -m [Link]
#Note: if the script folder location is different, you need to replace "C:" with directory folder (e.g.
'[FOLDER_VARIABLE]\scripts\UiPathPack.ps1')