UiPath Documentation
uipath-cli
latest
false
重要 :
このコンテンツは機械翻訳によって処理されています。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

UiPath CLI ユーザー ガイド

UIP またはセッション

uip or sessions Orchestrator セッション (ロボット (Attended および Unattended) と Orchestrator 間のライブ ホスト接続) を表示および管理します。これを使用して、接続されているホストの確認、ランタイムスロットの使用状況の検査、セッションのデバッグモードの切り替え、セッションのメンテナンス、または非アクティブなセッションのクリーンアップを行います。

概要

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

動詞

動詞目的
list-attended-sessions有人 (Studio/Assistant) セッションのリストは、テナント全体、またはフォルダーにスコープが設定されています。
list-machines-sessions特定のマシンのセッションのリストをマシン キー別に一覧表示します。
list-usernamesアクティブなセッションを持つユーザーのユーザー名のリストを取得します。
list-unattended-sessions無人セッションのランタイム (マシン間でのスロットの使用状況) のリストを取得します。
list-user-executorsAutomation Executor (ロボット名) をユーザー名でグループ化して一覧表示します。
toggle-debug-modeマシン セッションのデバッグ モードを有効化または無効化します。
delete-inactive切断状態または応答していないセッションを (すべてまたは ID で) 削除します。
set-maintenance-modeマシン セッションをメンテナンス モードにします。

すべての動詞は 、グローバル オプション (--output--output-filter--log-level--log-file) に従います。終了コードは 標準コントラクトに従います。

uip または sessions list-attended-sessions

有人セッションのリストを取得 — Studio と Assistant の接続。フォルダー フラグを指定しない場合、すべてのフォルダーにわたるセッションを返します (グローバル ビュー)。--folder-key または --folder-pathを指定すると、そのフォルダーにスコープが設定されているセッションが返されます。

オプション

Short長押し値 (Value)既定 (Default)説明
-t--tenantnameセッションの既定値テナントを上書きします。
--folder-keyGUIDフォルダー スコープのリストのフォルダー キー。
--folder-pathパスフォルダー パス (例: Shared)
--stateENUMAvailableBusyDisconnectedUnknown--stateしない場合、Disconnectedセッションは除外されます。
--machine-nametextマシン名の contains-match
-l--limitNumber50ページ サイズ
--offsetNumber0カウントをスキップします。
--order-byフィールドId descOData の並べ替え式 (例: MachineName asc)。

# 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}'

データシェイプ(--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 または sessions list-machines-sessions

1 台のマシンのセッションのリストをマシン キー別に一覧表示します。マシン キーは、 uip or machines listによって返される GUID です。任意で、フォルダーのスコープを設定します。

引数

名前Required目的
<machine-key>マシン キー (GUID)。[ uip or machines list] で検索します。

オプション

Short長押し値 (Value)既定 (Default)説明
-t--tenantnameセッションの既定値テナントを上書きします。
--folder-keyGUIDフォルダー スコープのリストのフォルダー キー。
--folder-pathパスフォルダー範囲のコンポーネントで使用するフォルダー パス。
-l--limitNumber50ページ サイズ
--offsetNumber0カウントをスキップします。
--order-byフィールドId descOData の並べ替え式。

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"

データシェイプ(--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 またはセッション リスト - ユーザー名

現在 Orchestrator に接続されているユーザーのユーザー名を返します。「今活躍しているのは誰ですか?」と素早く答えるのに便利です。

オプション

Short長押し値 (Value)既定 (Default)説明
-t--tenantnameセッションの既定値テナントを上書きします。
-l--limitNumber50ページ サイズ
--offsetNumber0カウントをスキップします。
--order-byフィールド並べ替え式 (既定では空)。

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

データシェイプ(--output json)

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

uip または sessions list-unattended-sessions

無人セッション ランタイムのリストを取得 — 無人マシンのスロット使用量ビューです。フォルダー フラグを指定しない場合は、テナント全体のセッションを返します。--folder-key または --folder-pathを指定すると、そのフォルダーにスコープが設定されているセッションが返されます。

オプション

Short長押し値 (Value)既定 (Default)説明
-t--tenantnameセッションの既定値テナントを上書きします。
--folder-keyGUIDフォルダー スコープのリストのフォルダー キー。
--folder-pathパスフォルダー パス (例: Shared)
--runtime-typeENUMランタイムの種類でフィルター処理します (例: UnattendedAttendedHeadlessServerless)。
-l--limitNumber50ページ サイズ
--offsetNumber0カウントをスキップします。
--order-byフィールドSessionId descOData の並べ替え式。

# 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

データシェイプ(--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 または sessions list-user-executors

各ユーザーに割り当てられた Automation Executor のリストを表示します。ユーザー名でグループ化されたロボット (Executor) 名を返します — どのユーザーがどの Unattended ロボットを持っているかを検出するのに役立ちます。

オプション

Short長押し値 (Value)既定 (Default)説明
-t--tenantnameセッションの既定値テナントを上書きします。
-l--limitNumber50ページ サイズ
--offsetNumber0カウントをスキップします。
--order-byフィールド並べ替え式 (既定では空)。

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

データシェイプ(--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 またはセッション toggle-debug-mode

マシン セッションのデバッグ モードを切り替えます。デバッグ モードを有効化すると、Studio インスタンスを実行中のセッションに接続できます。list-unattended-sessions または list-machines-sessions を使用してセッション ID を検索します。

引数

名前Required目的
<session-id>セッション ID (整数)

オプション

Short長押し値 (Value)既定 (Default)説明
-t--tenantnameセッションの既定値テナントを上書きします。
--enabledtrue/false— (必須)デバッグ モードを有効または無効にします。
--minutesNumberデバッグ モードをアクティブな状態に保つ時間 (分) です。

# 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

データシェイプ(--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 またはセッション delete-inactive

切断状態または応答がない (非アクティブな) セッションを削除します。特定のセッションを対象にするために 1 つ以上のセッション ID を指定するか、すべての ID を省略してテナント内のすべての非アクティブなセッションを削除します。

引数

名前Required目的
[session-ids...]×セッション ID (整数)。非アクティブなセッションをすべて削除するには省略します。

オプション

Short長押し値 (Value)既定 (Default)説明
-t--tenantnameセッションの既定値テナントを上書きします。

# 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

データシェイプ(--output json)

明示的な ID の場合:

{
  "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"
  }
}

ID なし:

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

uip または sessions set-maintenance-mode

マシン セッションをメンテナンス モードにする (または削除する)。メンテナンスにより、新しいジョブがセッションに割り当てられなくなります。メンテナンスを有効化する場合、実行中のジョブをソフトストップするか強制終了するかを --stop-jobs-strategy で制御します。

引数

名前Required目的
<session-id>セッション ID (整数)

オプション

Short長押し値 (Value)既定 (Default)説明
-t--tenantnameセッションの既定値テナントを上書きします。
--maintenance-modeENUM— (必須)Default または Enabled
--stop-jobs-strategyENUMSoftStop (優雅)または Kill (即時)。メンテナンスを有効化する場合にのみ適用されます。

# 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

データシェイプ(--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 — マシン名をlist-machines-sessionsのキーに解決します。
  • uip or users — ユーザーディレクトリセッションのユーザー名は、ここでユーザー レコードにマップされます。
  • uip or jobs — セッションで実行されているジョブを調査します。

参照

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得