UiPath Documentation
uipath-cli
latest
false

UiPath CLI user guide

Dernière mise à jour 7 mai 2026

uip or sessions

uip or sessions views and manages Orchestrator sessions — live host connections between robots (attended and unattended) and Orchestrator. Use it to see which hosts are connected, inspect runtime slot usage, toggle debug mode on a session, place a session into maintenance, or clean up inactive sessions.

Synopsis

uip or sessions <verb> [options]
uip or sessions <verb> [options]

Verbs

VerbObjectif
list-attended-sessionsList attended (Studio/Assistant) sessions across the tenant or scoped to a folder.
list-machines-sessionsList sessions for a specific machine by machine key.
list-usernamesList usernames of users with active sessions.
list-unattended-sessionsList unattended session runtimes (slot usage across machines).
list-user-executorsList automation executors (robot names) grouped by username.
toggle-debug-modeEnable or disable debug mode on a machine session.
delete-inactiveDelete disconnected or unresponsive sessions (all or by ID).
set-maintenance-modePlace a machine session into maintenance mode.

All verbs honor the global options (--output, --output-filter, --log-level, --log-file). Exit codes follow the standard contract.

uip or sessions list-attended-sessions

List attended sessions — Studio and Assistant connections. Without a folder flag, returns sessions across all folders (global view). With --folder-key or --folder-path, returns sessions scoped to the folder.

Options

ShortLongValeur (Value)DefaultDescription
-t--tenantnamesession defaultOverride the tenant.
--folder-keyGUIDFolder key for folder-scoped listing.
--folder-pathChemin d'accèsFolder path (for example, Shared).
--stateENUMAvailable, Busy, Disconnected, Unknown. Without --state, Disconnected sessions are excluded.
--machine-nametextContains-match on machine name.
-l--limitNumérique50Page size.
--offsetNumérique0Skip count.
--order-byChampId descOData sort expression (for example, MachineName asc).

Exemples

# Attended sessions across the tenant, excluding Disconnected
uip or sessions list-attended-sessions

# Only Busy sessions in a specific folder
uip or sessions list-attended-sessions --folder-path "Shared" --state Busy

# Just machine names and states, script-friendly
uip or sessions list-attended-sessions \
    --output-filter 'Data[].{m:MachineName, s:State}'
# Attended sessions across the tenant, excluding Disconnected
uip or sessions list-attended-sessions

# Only Busy sessions in a specific folder
uip or sessions list-attended-sessions --folder-path "Shared" --state Busy

# Just machine names and states, script-friendly
uip or sessions list-attended-sessions \
    --output-filter 'Data[].{m:MachineName, s:State}'

Data shape (--output json)

{
  "Code": "SessionList",
  "Data": [
    {
      "Id": 501,
      "HostMachineName": "host-01",
      "MachineId": 101,
      "MachineName": "attended-01",
      "State": "Available",
      "Job": null,
      "ReportingTime": "2025-04-15T10:30:00Z",
      "Info": "",
      "IsUnresponsive": false,
      "LicenseErrorCode": "",
      "OrganizationUnitId": 42,
      "FolderName": "Shared",
      "RobotSessionType": "Attended",
      "Version": "23.10.0",
      "Source": "Studio",
      "DebugModeExpirationDate": "",
      "UpdateInfo": null,
      "InstallationId": "",
      "Platform": "Windows",
      "EndpointDetection": ""
    }
  ]
}
{
  "Code": "SessionList",
  "Data": [
    {
      "Id": 501,
      "HostMachineName": "host-01",
      "MachineId": 101,
      "MachineName": "attended-01",
      "State": "Available",
      "Job": null,
      "ReportingTime": "2025-04-15T10:30:00Z",
      "Info": "",
      "IsUnresponsive": false,
      "LicenseErrorCode": "",
      "OrganizationUnitId": 42,
      "FolderName": "Shared",
      "RobotSessionType": "Attended",
      "Version": "23.10.0",
      "Source": "Studio",
      "DebugModeExpirationDate": "",
      "UpdateInfo": null,
      "InstallationId": "",
      "Platform": "Windows",
      "EndpointDetection": ""
    }
  ]
}

uip or sessions list-machines-sessions

List sessions for one machine by machine key. The machine key is the GUID returned by uip or machines list. Optionally scope to a folder.

Arguments

NomRequisObjectif
<machine-key>ouiMachine key (GUID). Find it with uip or machines list.

Options

ShortLongValeur (Value)DefaultDescription
-t--tenantnamesession defaultOverride the tenant.
--folder-keyGUIDFolder key for folder-scoped listing.
--folder-pathChemin d'accèsFolder path for folder-scoped listing.
-l--limitNumérique50Page size.
--offsetNumérique0Skip count.
--order-byChampId descOData sort expression.

Exemples

uip or sessions list-machines-sessions a1b2c3d4-0000-0000-0000-000000000001
uip or sessions list-machines-sessions a1b2c3d4-0000-0000-0000-000000000001 \
    --folder-path "Production"
uip or sessions list-machines-sessions a1b2c3d4-0000-0000-0000-000000000001
uip or sessions list-machines-sessions a1b2c3d4-0000-0000-0000-000000000001 \
    --folder-path "Production"

Data shape (--output json)

{
  "Code": "SessionGetMachine",
  "Data": [
    {
      "Id": 601,
      "ServiceUserName": "svc-runner",
      "HostMachineName": "prod-worker-01",
      "MachineId": 101,
      "MachineName": "prod-worker-01",
      "State": "Available",
      "Job": null,
      "ReportingTime": "2025-04-15T10:30:00Z",
      "Info": "",
      "IsUnresponsive": false,
      "LicenseErrorCode": "",
      "OrganizationUnitId": 42,
      "FolderName": "Shared",
      "RobotSessionType": "Unattended",
      "Version": "23.10.0",
      "Source": "",
      "DebugModeExpirationDate": "",
      "UpdateInfo": null,
      "InstallationId": "",
      "Platform": "Windows",
      "EndpointDetection": ""
    }
  ]
}
{
  "Code": "SessionGetMachine",
  "Data": [
    {
      "Id": 601,
      "ServiceUserName": "svc-runner",
      "HostMachineName": "prod-worker-01",
      "MachineId": 101,
      "MachineName": "prod-worker-01",
      "State": "Available",
      "Job": null,
      "ReportingTime": "2025-04-15T10:30:00Z",
      "Info": "",
      "IsUnresponsive": false,
      "LicenseErrorCode": "",
      "OrganizationUnitId": 42,
      "FolderName": "Shared",
      "RobotSessionType": "Unattended",
      "Version": "23.10.0",
      "Source": "",
      "DebugModeExpirationDate": "",
      "UpdateInfo": null,
      "InstallationId": "",
      "Platform": "Windows",
      "EndpointDetection": ""
    }
  ]
}

uip or sessions list-usernames

Return the usernames of users currently connected to Orchestrator. Useful for quickly answering "who is active right now?".

Options

ShortLongValeur (Value)DefaultDescription
-t--tenantnamesession defaultOverride the tenant.
-l--limitNumérique50Page size.
--offsetNumérique0Skip count.
--order-byChampSort expression (empty by default).

Exemples

uip or sessions list-usernames
uip or sessions list-usernames --limit 200
uip or sessions list-usernames
uip or sessions list-usernames --limit 200

Data shape (--output json)

{
  "Code": "SessionListUsernames",
  "Data": ["admin@example.com", "ops@example.com"]
}
{
  "Code": "SessionListUsernames",
  "Data": ["admin@example.com", "ops@example.com"]
}

uip or sessions list-unattended-sessions

List unattended session runtimes — the slot usage view for unattended machines. Without a folder flag, returns sessions across the tenant. With --folder-key or --folder-path, returns sessions scoped to the folder.

Options

ShortLongValeur (Value)DefaultDescription
-t--tenantnamesession defaultOverride the tenant.
--folder-keyGUIDFolder key for folder-scoped listing.
--folder-pathChemin d'accèsFolder path (for example, Shared).
--runtime-typeENUMFilter by runtime type (for example, Unattended, Attended, Headless, Serverless).
-l--limitNumérique50Page size.
--offsetNumérique0Skip count.
--order-byChampSessionId descOData sort expression.

Exemples

# All unattended runtimes in the tenant
uip or sessions list-unattended-sessions

# Serverless-only in a specific folder
uip or sessions list-unattended-sessions --folder-path "Shared" \
    --runtime-type Serverless
# All unattended runtimes in the tenant
uip or sessions list-unattended-sessions

# Serverless-only in a specific folder
uip or sessions list-unattended-sessions --folder-path "Shared" \
    --runtime-type Serverless

Data shape (--output json)

{
  "Code": "SessionListMachineSessions",
  "Data": [
    {
      "SessionId": 701,
      "MachineId": 101,
      "MachineKey": "a1b2c3d4-0000-0000-0000-000000000001",
      "MachineName": "prod-worker-01",
      "MaintenanceMode": "Default",
      "HostMachineName": "prod-worker-01",
      "RuntimeType": "Unattended",
      "MachineType": "Standard",
      "MachineScope": "Default",
      "Status": "Available",
      "IsUnresponsive": false,
      "Runtimes": 3,
      "UsedRuntimes": 1,
      "ServiceUserName": "svc-runner",
      "ReportingTime": "2025-04-15T10:30:00Z",
      "Version": "23.10.0",
      "DebugModeExpirationDate": "",
      "Platform": "Windows",
      "EndpointDetection": "",
      "TriggersCount": 0
    }
  ]
}
{
  "Code": "SessionListMachineSessions",
  "Data": [
    {
      "SessionId": 701,
      "MachineId": 101,
      "MachineKey": "a1b2c3d4-0000-0000-0000-000000000001",
      "MachineName": "prod-worker-01",
      "MaintenanceMode": "Default",
      "HostMachineName": "prod-worker-01",
      "RuntimeType": "Unattended",
      "MachineType": "Standard",
      "MachineScope": "Default",
      "Status": "Available",
      "IsUnresponsive": false,
      "Runtimes": 3,
      "UsedRuntimes": 1,
      "ServiceUserName": "svc-runner",
      "ReportingTime": "2025-04-15T10:30:00Z",
      "Version": "23.10.0",
      "DebugModeExpirationDate": "",
      "Platform": "Windows",
      "EndpointDetection": "",
      "TriggersCount": 0
    }
  ]
}

uip or sessions list-user-executors

List automation executors assigned to each user. Returns robot (executor) names grouped by username — useful for discovering which users have which unattended robots.

Options

ShortLongValeur (Value)DefaultDescription
-t--tenantnamesession defaultOverride the tenant.
-l--limitNumérique50Page size.
--offsetNumérique0Skip count.
--order-byChampSort expression (empty by default).

Exemples

uip or sessions list-user-executors
uip or sessions list-user-executors

Data shape (--output json)

{
  "Code": "SessionListUserExecutors",
  "Data": [
    { "UserName": "admin@example.com", "RobotNames": ["prod-worker-01", "prod-worker-02"] },
    { "UserName": "ops@example.com", "RobotNames": ["dev-serverless"] }
  ]
}
{
  "Code": "SessionListUserExecutors",
  "Data": [
    { "UserName": "admin@example.com", "RobotNames": ["prod-worker-01", "prod-worker-02"] },
    { "UserName": "ops@example.com", "RobotNames": ["dev-serverless"] }
  ]
}

uip or sessions toggle-debug-mode

Toggle debug mode on a machine session. Enabling debug mode allows connecting a Studio instance to the running session. Use list-unattended-sessions or list-machines-sessions to find session IDs.

Arguments

NomRequisObjectif
<session-id>ouiSession ID (integer).

Options

ShortLongValeur (Value)DefaultDescription
-t--tenantnamesession defaultOverride the tenant.
--enabledtrue/false— (required)Enable or disable debug mode.
--minutesNumériqueDuration, in minutes, for debug mode to remain active.

Exemples

# Enable debug mode for 60 minutes
uip or sessions toggle-debug-mode 701 --enabled true --minutes 60

# Disable debug mode
uip or sessions toggle-debug-mode 701 --enabled false
# Enable debug mode for 60 minutes
uip or sessions toggle-debug-mode 701 --enabled true --minutes 60

# Disable debug mode
uip or sessions toggle-debug-mode 701 --enabled false

Data shape (--output json)

{
  "Code": "SessionToggleDebugMode",
  "Data": {
    "SessionId": 701,
    "Enabled": true,
    "Status": "Debug mode updated successfully"
  }
}
{
  "Code": "SessionToggleDebugMode",
  "Data": {
    "SessionId": 701,
    "Enabled": true,
    "Status": "Debug mode updated successfully"
  }
}

uip or sessions delete-inactive

Delete disconnected or unresponsive (inactive) sessions. Provide one or more session IDs to target specific sessions, or omit all IDs to delete every inactive session in the tenant.

Arguments

NomRequisObjectif
[session-ids...]nonSession IDs (integers). Omit to delete all inactive sessions.

Options

ShortLongValeur (Value)DefaultDescription
-t--tenantnamesession defaultOverride the tenant.

Exemples

# Delete specific inactive sessions
uip or sessions delete-inactive 701 702

# Delete every inactive session in the tenant
uip or sessions delete-inactive
# Delete specific inactive sessions
uip or sessions delete-inactive 701 702

# Delete every inactive session in the tenant
uip or sessions delete-inactive

Data shape (--output json)

With explicit IDs:

{
  "Code": "SessionDeleteInactive",
  "Data": {
    "SessionIds": [701, 702],
    "Count": 2,
    "Status": "Inactive sessions deleted successfully"
  }
}
{
  "Code": "SessionDeleteInactive",
  "Data": {
    "SessionIds": [701, 702],
    "Count": 2,
    "Status": "Inactive sessions deleted successfully"
  }
}

Without IDs:

{
  "Code": "SessionDeleteInactive",
  "Data": { "Status": "All inactive sessions deleted successfully" }
}
{
  "Code": "SessionDeleteInactive",
  "Data": { "Status": "All inactive sessions deleted successfully" }
}

uip or sessions set-maintenance-mode

Place a machine session into maintenance mode (or take it out). Maintenance prevents new jobs from being assigned to the session. When enabling maintenance, --stop-jobs-strategy controls whether running jobs are soft-stopped or force-killed.

Arguments

NomRequisObjectif
<session-id>ouiSession ID (integer).

Options

ShortLongValeur (Value)DefaultDescription
-t--tenantnamesession defaultOverride the tenant.
--maintenance-modeENUM— (required)Default ou Enabled.
--stop-jobs-strategyENUMSoftStop (graceful) or Kill (immediate). Only applies when enabling maintenance.

Exemples

# Enable maintenance, soft-stop running jobs
uip or sessions set-maintenance-mode 701 \
    --maintenance-mode Enabled --stop-jobs-strategy SoftStop

# Take the session back out of maintenance
uip or sessions set-maintenance-mode 701 --maintenance-mode Default
# Enable maintenance, soft-stop running jobs
uip or sessions set-maintenance-mode 701 \
    --maintenance-mode Enabled --stop-jobs-strategy SoftStop

# Take the session back out of maintenance
uip or sessions set-maintenance-mode 701 --maintenance-mode Default

Data shape (--output json)

{
  "Code": "SessionSetMaintenanceMode",
  "Data": {
    "SessionId": 701,
    "MaintenanceMode": "Enabled",
    "Status": "Maintenance mode updated successfully"
  }
}
{
  "Code": "SessionSetMaintenanceMode",
  "Data": {
    "SessionId": 701,
    "MaintenanceMode": "Enabled",
    "Status": "Maintenance mode updated successfully"
  }
}
  • uip or machines — resolve machine names to keys for list-machines-sessions.
  • uip or users — user directory; session usernames map back to user records here.
  • uip or jobs — investigate jobs running on a session.

Voir également

Cette page vous a-t-elle été utile ?

Connecter

Besoin d'aide ? Assistance

Vous souhaitez apprendre ? UiPath Academy

Vous avez des questions ? UiPath Forum

Rester à jour