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>]
Examples (Deploy Assets):
. 'C:\scripts\UiPathManageAssets.ps1' deploy assets_file.csv "https://uipath-orchestrator.myorg.com" defaultTenant -orchestrator_user admin -orchestrator_pass 123456
. 'C:\scripts\UiPathManageAssets.ps1' deploy assets_file.csv "https://uipath-orchestrator.myorg.com" defaultTenant -orchestrator_user admin -orchestrator_pass 123456 -folder_organization_unit OurOrganization
. 'C:\scripts\UiPathManageAssets.ps1' deploy assets_file.csv "https://cloud.uipath.com" defaultTenant -UserKey a7da29a2c93a717110a82 -account_name myAccount -language en-US
. 'C:\scripts\UiPathManageAssets.ps1' deploy assets_file.csv "https://cloud.uipath.com" defaultTenant -accountForApp myAccountForExternalApp -applicationId myExternalAppId -applicationSecret myExternalAppSecret -applicationScope "OR.Folders.Read OR.Settings.Read" -language en-US
Examples (Delete Assets):
. 'C:\scripts\UiPathManageAssets.ps1' delete assets_file.csv "https://uipath-orchestrator.myorg.com" defaultTenant -orchestrator_user admin -orchestrator_pass 123456
. 'C:\scripts\UiPathManageAssets.ps1' delete assets_file.csv "https://uipath-orchestrator.myorg.com" defaultTenant -orchestrator_user admin -orchestrator_pass 123456 -folder_organization_unit OurOrganization
. 'C:\scripts\UiPathManageAssets.ps1' delete assets_file.csv "https://cloud.uipath.com" defaultTenant -UserKey a7da29a2c93a717110a82 -account_name myAccount -language en-US
. 'C:\scripts\UiPathManageAssets.ps1' delete assets_file.csv "https://cloud.uipath.com" defaultTenant -accountForApp myAccountForExternalApp -applicationId myExternalAppId -applicationSecret myExternalAppSecret -applicationScope "OR.Folders.Read OR.Settings.Read" -language en-US
#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 "https://uipath-orchestrator.myorg.com" defaultTenant -orchestrator_user admin -orchestrator_pass 123456 -uipathCliFilePath "C:\uipathcli\uipcli.exe"More on different authentication options here UiPathAuthenticationsOptions
Script Parameters
-
$operationManage assets operation either 'delete' or 'deploy' -
$assets_fileThe 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
asset_1_name,text,asset_value # we can have comments,asset_1_description asset_2_name,integer,123,asset_2_description asset_3_name,boolean,false,asset_3_description asset_4_name,credential,"username::password",asset_4_description -
orchestrator_urlRequired. The URL of the Orchestrator instance. -
orchestrator_tenantRequired. The tenant of the Orchestrator instance. -
accountForAppThe Orchestrator CloudRPA account name. Must be used together with id, secret and scope(s) for external application. -
applicationIdThe external application id. Must be used together with account, secret and scope(s) for external application. -
applicationSecretThe external application secret. Must be used together with account, id and scope(s) for external application. -
applicationScopeThe space-separated list of application scopes. Must be used together with account, id and secret for external application. -
orchestrator_userRequired. The Orchestrator username used for authentication. Must be used together with the password. -
orchestrator_passRequired. The Orchestrator password used for authentication. Must be used together with the username -
UserKeyRequired. The Orchestrator OAuth2 refresh token used for authentication. Must be used together with the account name and client id. -
account_nameRequired. The Orchestrator CloudRPA account name. Must be used together with the refresh token and client id. -
folder_organization_unitThe Orchestrator folder (organization unit). -
languageThe orchestrator language. -
disableTelemetryDisable telemetry data. -
uipathCliFilePathif not provided, the script will auto download the cli from uipath public feed. the script was tested on version 23.10.8753.32995 -
SpecificCLIVersionCLI version to auto download if uipathCliFilePath not provided. Default is "23.10.8753.32995" where the script was last tested.