> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/device-commands.md).

# デバイス管理コマンド

エンドユーザーおよび管理者向けのデバイス関連コマンド

### 概要 <a href="#overview" id="overview"></a>

このセクションでは、Keeperアカウントに登録されたデバイスの管理に関わる、Keeper SDKの全コマンドをまとめています。ここでの「デバイス管理コマンド」とは、デバイスの一覧表示や名前変更、セッションのログアウト、永続ログイン用のデバイスのリンク/リンク解除などを指します。これらのコマンドを使うと、デスクトップやモバイルなど各種クライアント上のKeeperセッションを、確認・制御・保護できます。

現時点でSDKが対応しているコマンドは以下のとおりです。

#### ユーザーコマンド (アカウントスコープ) <a href="#user-commands-account-scope" id="user-commands-account-scope"></a>

* [デバイス一覧](#device-list-command)
* [デバイス名変更](#device-rename-command)
* [デバイスアクション](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/device-commands/device-action-commands.md)
  * ログアウト
  * 削除
  * ロック
  * ロック解除
  * アカウントロック
  * アカウントロック解除
  * リンク
  * リンク解除
* [This Device](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/miscellaneous-commands/this-device-commands.md)

#### エンタープライズ管理者コマンド (エンタープライズスコープ) <a href="#enterprise-admin-commands-enterprise-scope" id="enterprise-admin-commands-enterprise-scope"></a>

* [デバイス管理者](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/device-commands/device-admin-commands.md)
  * デバイス管理者一覧
  * デバイス管理者アクション
  * ログアウト
  * 削除
* [デバイス承認](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/enterprise-management-commands/device-approve-commands.md)

エンタープライズ管理者は、エンタープライズユーザーのデバイスを一覧表示できます。また、リモートでユーザーをログアウトさせたり、選択したデバイスを削除したりすることも可能です。デバイス承認は、クラウドSSOのデバイス承認ワークフローに対応しています。

### デバイス一覧 <a href="#device-list-command" id="device-list-command"></a>

現在のユーザーのアクティブなデバイスをすべて一覧表示します。

<details>

<summary>DotNet CLI</summary>

**コマンド**: `devices`

**サブコマンド:** `list`

**パラメータ:**

`-f, --force (デフォルト: false)` デバイス一覧を再読み込みします

`-l, --link (デフォルト: false)` デバイスをリンクします

`--help` このヘルプ画面を表示します。

`--version` バージョン情報を表示します。

`value pos. 0` デバイスコマンド: "approve"、"decline"、"list"

`value pos. 1` デバイスID、または "all"、"clear"

**例:**

```
My Vault> devices list

  #  Device Name              Client                     ID                    Status  Data Key
---  -----------------------  -------------------------  --------------------  ------  --------
  1  Web Vault Chrome         Web App 17.4.0             <     ID1          >  OK      Yes     
  2  Users_phone              Android 17.3.30            <     ID2          >  OK      Yes     
  5  Browser Extension        Browser Extensions 17.3.2  <     ID3          >  OK      Yes     
  6  OFF                      Commander 17.0.0           <     ID4          >  OK      Yes     
  8  Web Vault Edge           Web App 17.3.3             <     ID5          >  OK      Yes     
  9  Python Keeper API        Commander 17.0.0           <     ID6          >  OK      No      
 10  .NET Keeper API          Commander 17.0.0           <     ID7          >  OK      No      
 14  Web Vault Firefox        Web App 17.4.0             <     ID8          >  OK      Yes     
 15  Firefox,MacIntel         EMConsole 17.6.0           <     ID9          >  OK      No      
 16  PowerShell Commander     Commander 17.0.0           <     ID10         >  OK      Yes     
 17  Commander CLI on macOS   Commander 17.1.9           <     ID11         >  OK      No      
 18  Commander C#             Commander 17.0.0           <     ID12         >  OK      No      
 19  Commander CLI on win32   Commander 17.1.0           <     ID13         >  OK      Yes     
 27  Desktop                  DesktopElectron 17.2.1     <     ID14         >  OK      Yes     
```

</details>

<details>

<summary>DotNet SDK</summary>

近日公開

</details>

<details>

<summary>PowerCommander</summary>

近日公開

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `device-list`

**構文:**

```bash
device-list [--format=FORMAT] [--output=FILE]
```

**パラメータ:**

* `--format` 出力形式。値: `table` または `json`。デフォルト: `table`
* `--output` 出力ファイル名。`table` 形式では無視されます

**例:**

```bash
My Vault> device-list
User Devices (3 found)
ID  Device Name      Client Type       Login Status  Last Accessed
1   My iPhone        IOS               LOGGED_IN     2025-01-15 10:30:25
2   Work Laptop      CHROME_EXTENSION  LOGGED_IN     2025-01-15 09:15:42
3   Home Desktop     DESKTOP           LOGGED_OUT    2025-01-14 18:22:15
```

```bash
My Vault> device-list --format=json
{
  "devices": [
    {
      "id": 1,
      "deviceName": "My iPhone",
      "clientType": "IOS",
      "loginStatus": "LOGGED_IN",
      "lastAccessedTimestamp": "2025-01-15 10:30:25"
    },
    {
      "id": 2,
      "deviceName": "Work Laptop",
      "clientType": "CHROME_EXTENSION",
      "loginStatus": "LOGGED_IN",
      "lastAccessedTimestamp": "2025-01-15 09:15:42"
    }
  ]
}
```

```bash
My Vault> device-list --format=json --output=my_devices.json
Results saved to my_devices.json
```

</details>

<details>

<summary>Python SDK</summary>

**関数:** `list_user_devices`

**例:**

```python
from keepersdk.authentication import device_management

# auth: ログイン済みのKeeperAuthセッション (ログイン後)
devices = device_management.list_user_devices(auth)

# 各デバイスはUserDeviceInfoオブジェクトで、最終アクセスの新しい順にソートされます
for d in devices:
    print(
        d.list_index,      # device-listのデバイスID (1、2、3...)。device-action/device-renameで使用します
        d.name,            # デバイス名 (例: "MacBook Pro"、"iPhone 15")
        d.client_type,     # クライアントタイプ (例: Web Vault、Mobile、Desktop)
        d.login_status,    # 現在このデバイスにログイン中かどうか
        d.last_accessed,   # 最終アクセスのdatetime。取得できない場合はNone
    )
```

</details>

### デバイス名変更 <a href="#device-rename-command" id="device-rename-command"></a>

デバイスの名前を、わかりやすい名前に変更します。

<details>

<summary>DotNet CLI</summary>

近日公開

</details>

<details>

<summary>DotNet SDK</summary>

近日公開

</details>

<details>

<summary>PowerCommander</summary>

近日公開

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `device-rename`

**構文:**

```bash
device-rename <Device ID / Device Name> <NEW_NAME>
```

**パラメータ:**

* `DEVICE` `1`、`2`、`3` などのデバイスID、またはデバイス名
* `NEW_NAME` デバイスの新しい名前

**例:**

```bash
My Vault> device-rename 1 "My New iPhone"
✓ Device name updated from 'My iPhone' to 'My New iPhone'

Updated device list:
User Devices (3 found)
ID  Device Name        Client Type       Login Status  Last Accessed
1   My New iPhone      IOS               LOGGED_IN     2025-01-15 10:40:33
2   Work Laptop        CHROME_EXTENSION  LOGGED_IN     2025-01-15 09:15:42
3   Home Desktop       DESKTOP           LOGGED_OUT    2025-01-14 18:22:15
```

```bash
My Vault> device-rename "Work Laptop" "Updated Work Laptop"
✓ Device name updated from 'Work Laptop' to 'Updated Work Laptop'
```

</details>

<details>

<summary>Python SDK</summary>

**関数:** `rename_user_device`

**例:**

```python
from keepersdk.authentication import device_management

# auth: ログイン済みのKeeperAuthセッション (ログイン後)

# デバイスは、リストID (device-listで取得) または完全なデバイス名で指定します
device_identifier = '1'          # 例: list_user_devicesで取得したID
new_device_name = 'Work Laptop'  # 新しく設定する名前

# デバイス名を変更します。成功時は (old_name, new_name) を返します
old_name, updated_name = device_management.rename_user_device(
    auth,
    device_identifier,
    new_device_name,
)

print(f'Device renamed from "{old_name}" to "{updated_name}"')

# 任意: 更新内容を確認するため、デバイス一覧を再取得します
devices = device_management.list_user_devices(auth)
for d in devices:
    print(d.list_index, d.name, d.client_type, d.login_status, d.last_accessed)
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/device-commands.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
