UiPath Documentation
uipath-cli
latest
false

UiPath CLI user guide

Last updated May 7, 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

VerbPurpose
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

ShortLongValueDefaultDescription
-t--tenantnamesession defaultOverride the tenant.
--folder-keyGUIDFolder key for folder-scoped listing.
--folder-pathpathFolder path (for example, Shared).
--stateenumAvailable, Busy, Disconnected, Unknown. Without --state, Disconnected sessions are excluded.
--machine-nametextContains-match on machine name.
-l--limitnumber50Page size.
--offsetnumber0Skip count.
--order-byfieldId descOData sort expression (for example, MachineName asc).

Examples

# 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

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

Options

ShortLongValueDefaultDescription
-t--tenantnamesession defaultOverride the tenant.
--folder-keyGUIDFolder key for folder-scoped listing.
--folder-pathpathFolder path for folder-scoped listing.
-l--limitnumber50Page size.
--offsetnumber0Skip count.
--order-byfieldId descOData sort expression.

Examples

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

ShortLongValueDefaultDescription
-t--tenantnamesession defaultOverride the tenant.
-l--limitnumber50Page size.
--offsetnumber0Skip count.
--order-byfieldSort expression (empty by default).

Examples

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": ["[email protected]", "[email protected]"]
}
{
  "Code": "SessionListUsernames",
  "Data": ["[email protected]", "[email protected]"]
}

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

ShortLongValueDefaultDescription
-t--tenantnamesession defaultOverride the tenant.
--folder-keyGUIDFolder key for folder-scoped listing.
--folder-pathpathFolder path (for example, Shared).
--runtime-typeenumFilter by runtime type (for example, Unattended, Attended, Headless, Serverless).
-l--limitnumber50Page size.
--offsetnumber0Skip count.
--order-byfieldSessionId descOData sort expression.

Examples

# 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

ShortLongValueDefaultDescription
-t--tenantnamesession defaultOverride the tenant.
-l--limitnumber50Page size.
--offsetnumber0Skip count.
--order-byfieldSort expression (empty by default).

Examples

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

Data shape (--output json)

{
  "Code": "SessionListUserExecutors",
  "Data": [
    { "UserName": "[email protected]", "RobotNames": ["prod-worker-01", "prod-worker-02"] },
    { "UserName": "[email protected]", "RobotNames": ["dev-serverless"] }
  ]
}
{
  "Code": "SessionListUserExecutors",
  "Data": [
    { "UserName": "[email protected]", "RobotNames": ["prod-worker-01", "prod-worker-02"] },
    { "UserName": "[email protected]", "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

NameRequiredPurpose
<session-id>yesSession ID (integer).

Options

ShortLongValueDefaultDescription
-t--tenantnamesession defaultOverride the tenant.
--enabledtrue/false— (required)Enable or disable debug mode.
--minutesnumberDuration, in minutes, for debug mode to remain active.

Examples

# 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

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

Options

ShortLongValueDefaultDescription
-t--tenantnamesession defaultOverride the tenant.

Examples

# 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

NameRequiredPurpose
<session-id>yesSession ID (integer).

Options

ShortLongValueDefaultDescription
-t--tenantnamesession defaultOverride the tenant.
--maintenance-modeenum— (required)Default or Enabled.
--stop-jobs-strategyenumSoftStop (graceful) or Kill (immediate). Only applies when enabling maintenance.

Examples

# 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.

See also

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated