> 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/pedm-commands/pedm-agent-commands.md).

# KEPMエージェントコマンド

### 概要

ここでは、KEPMエージェントを管理するKeeperコマンダーのコマンドを扱います。エージェントはエンドポイントに導入され、KEPMシステムと通信して特権昇格ポリシーを適用します。これらのコマンドで、管理者はエージェントの状態確認、設定変更、エージェントに紐づくリソースコレクションの管理が行えます。

このセクションで扱うコマンドは以下のとおりです。

* [**エージェント一覧コマンド**](#agent-list-command)
* [**エージェント編集コマンド**](#agent-edit-command)
* [**エージェント削除コマンド**](#agent-delete-command)
* [**エージェントのコレクション表示コマンド**](#agent-collection-command)

### 使い方

`pedm agent command [--options]` または `pedm a command [--options]`

**別名:** `a`

***

### エージェント一覧コマンド <a href="#agent-list-command" id="agent-list-command"></a>

登録済みのKEPMエージェントを、エージェントUID、マシン名、デプロイ割り当て、状態、作成日を含む詳細とともに表示します。KEPMエージェントが導入された全エンドポイントの概要を確認できます。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `epm-agent list`

**例:**

{% code expandable="true" %}

```bash
My Vault > epm-agent list
```

{% endcode %}

**コマンド:** `epm-agent view`

**パラメータ:**

| パラメータ          | 型      | 必須 | デフォルト | 説明        |
| -------------- | ------ | -- | ----- | --------- |
| *(positional)* | String | はい | —     | エージェントUID |

**例:**

{% code expandable="true" %}

```bash
My Vault > epm-agent view abc123uid
```

{% endcode %}

</details>

<details>

<summary>DotNet SDK</summary>

**関数:**

{% code expandable="true" %}

```csharp
// Get all agents
IEnumerable<EpmAgent> allAgents = plugin.Agents.GetAll();
// Get a single agent by UID
EpmAgent agent = plugin.Agents.GetEntity(agentUid);
```

{% endcode %}

</details>

<details>

<summary>Power Commander</summary>

**コマンド:** `Get-KeeperEpmAgentList`

**別名:** `kepm-agent-list`

**例:**

{% code expandable="true" %}

```ps1
PS > Get-KeeperEpmAgentList

AgentUid               MachineName                                 Deployment                Disabled Created             Modified
--------               -----------                                 ----------                -------- -------             --------
3rbun_JdbTQ-LewN_pwS1g 0oWfLBXW5E6ERvpSPdTmOiaZ5rl83esyiFyO-E5NRgs ServiceNow                False    2026-01-28 15:07:47 2026-02-03 07:13:44
680p8dW43xugzV_YSnGncg KENzZzzdr1PUB0ktHY9lZSU3zDyBqxw5EJ2yS1WrxYw KEPM Test Team            False    2026-03-13 08:32:02 2026-03-26 09:34:40
A2kT6arXQc9YP9805zPXUw OIaS7LT8dyxy53P0jCTWrY1iKr-hKUQWLHz7biBo3SU Jira PEDM Command         False    2025-11-10 11:06:38 2026-01-02 05:52:40
```

{% endcode %}

**コマンド:** `Get-KeeperEpmAgent`

**別名:** `kepm-agent-view`

**パラメータ:**

<table><thead><tr><th width="180.00006103515625">パラメータ</th><th>説明</th></tr></thead><tbody><tr><td><code>-AgentUidOrName</code></td><td>エージェントUIDまたはマシン名 (大文字小文字を区別しない)</td></tr></tbody></table>

**例:**

{% code expandable="true" %}

```ps1
PS > Get-KeeperEpmAgent 3rbun_JdbTQ-LewN_pwS1g
Agent: 0oWfLBXW5E6ERvpSPdTmOiaZ5rl83esyiFyO-E5NRgs
  UID: 3rbun_JdbTQ-LewN_pwS1g
  Status: Active
  Deployment: XUflUP3Utcr4j83o8sMRKg
  Created: 2026-01-28 15:07:47
  Modified: 2026-02-03 07:13:44
```

{% endcode %}

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `pedm agent list`

**別名:** `pedm a l`, `pedm a list`

**フラグ:**

| フラグ             | 説明                         |
| --------------- | -------------------------- |
| `-v, --verbose` | 稼働状態やプロパティを含む詳細情報の表示       |
| `--format`      | 出力形式 (json、csv、tableのいずれか) |
| `--output`      | 指定ファイルへの保存                 |

**例:**

```
My Vault> pedm agent list

Agent UID: agent_abc123
Machine Name: SERVER-001
Deployment: Production
Disabled: False
Created: 2024-10-20
```

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.plugins.pedm import admin_plugin

plugin = admin_plugin.PedmPlugin(enterprise_loader)
agent_list = plugin.agents.get_all_entities()
```

</details>

### エージェント編集コマンド <a href="#agent-edit-command" id="agent-edit-command"></a>

KEPMエージェントの有効/無効の切り替えやデプロイ間の移動など、エージェントの構成を変更します。エンドポイントでエージェントを再インストールせずに、管理者が設定を更新できます。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `epm-agent update`

**パラメータ:**

<table><thead><tr><th width="197.00006103515625">パラメータ</th><th>説明</th></tr></thead><tbody><tr><td><em>(positional)</em></td><td>1つ以上のエージェントUID</td></tr><tr><td><code>--deployment</code></td><td>エージェントを割り当てるデプロイUID</td></tr><tr><td><code>--enable</code></td><td><code>on</code> で有効化、<code>off</code> で無効化</td></tr></tbody></table>

**例:**

{% code expandable="true" %}

```bash
My Vault > epm-agent update abc123uid --enable off
```

{% endcode %}

</details>

<details>

<summary>DotNet SDK</summary>

**関数:**

{% code expandable="true" %}

```csharp
public async Task<ModifyStatus> ModifyAgents(
    IEnumerable<UpdateAgent> updateAgents = null,
    IEnumerable<string> removeAgents = null)
```

{% endcode %}

</details>

<details>

<summary>Power Commander</summary>

**コマンド:** `Update-KeeperEpmAgent`

**別名:** `kepm-agent-edit`

**パラメータ:**

<table><thead><tr><th width="230.99993896484375">パラメータ</th><th>説明</th></tr></thead><tbody><tr><td><code>-AgentUidOrName</code></td><td>1つ以上のエージェントUIDまたはマシン名 (大文字小文字を区別しない)。パイプライン入力に対応</td></tr><tr><td><code>-DeploymentUid</code></td><td>エージェントを割り当てるデプロイUID</td></tr><tr><td><code>-Enable</code></td><td><code>on</code> または <code>off</code> でエージェントの有効化または無効化</td></tr></tbody></table>

**例:**

{% code expandable="true" %}

```ps1
PS >  Update-KeeperEpmAgent "wnEWtpyWjypIgPNCLkzLVg" -Enable off
1 agent(s) updated.
  Updated: wnEWtpyWjypIgPNCLkzLVg
```

{% endcode %}

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `pedm agent edit <agent> [agent...]`

**別名:** `pedm a e`, `pedm a edit`

**フラグ:**

| フラグ            | 説明                                  |
| -------------- | ----------------------------------- |
| `--enable`     | エージェントの有効化または無効化 (choices: on, off) |
| `--deployment` | 指定したデプロイUIDへのエージェント移動               |
| `agent`        | エージェントUID (必須、複数指定可)                |

**例:**

```
My Vault> pedm agent edit agent_abc123 --enable on --deployment prod_deploy_123

Agent updated successfully
```

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.plugins.pedm import admin_plugin

plugin = admin_plugin.PedmPlugin(enterprise_loader)

agent_id = 'agent name or uid'
deployment_id = 'deployment name or id'
deployment = plugin.deployments.get_entity(deployment_id)

agent = plugin.agents.get_entity(agent_id)

update_agents: List[admin_types.UpdateAgent] = []
update_agents.append(admin_types.UpdateAgent(
                    agent_uid=agent.agent_uid,
                    deployment_uid=deployment.deployment_uid,
                    disabled=disabled,
                ))
                
response = plugin.modify_agents(update_agents=update_agents)
```

</details>

### エージェント削除コマンド <a href="#agent-delete-command" id="agent-delete-command"></a>

システムから1つ以上のKEPMエージェントを削除します。このコマンドはKEPM管理システムからエージェントの登録を恒久削除しますが、エンドポイント上のエージェントソフトウェアのアンインストールは行いません。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `epm-agent remove`

**パラメータ:**

<table><thead><tr><th width="211.99993896484375">パラメータ</th><th>説明</th></tr></thead><tbody><tr><td><em>(positional)</em></td><td>エージェントUIDまたはマシン名</td></tr></tbody></table>

**例:**

{% code expandable="true" %}

```bash
My Vault > epm-agent remove abc123uid
```

{% endcode %}

</details>

<details>

<summary>DotNet SDK</summary>

**関数:**

{% code expandable="true" %}

```csharp
public async Task<ModifyStatus> ModifyAgents(
    IEnumerable<UpdateAgent> updateAgents = null,
    IEnumerable<string> removeAgents = null)
```

{% endcode %}

</details>

<details>

<summary>Power Commander</summary>

**コマンド:** `Remove-KeeperEpmAgent`

**別名:** `kepm-agent-delete`

**パラメータ:**

<table><thead><tr><th width="208">パラメータ</th><th>説明</th></tr></thead><tbody><tr><td><code>-AgentUidOrName</code></td><td>エージェントUIDまたはマシン名 (大文字小文字を区別しない)</td></tr><tr><td><code>-Force</code></td><td>削除前の確認プロンプトを省略</td></tr></tbody></table>

**例:**

{% code expandable="true" %}

```ps1
PS > Remove-KeeperEpmAgent -AgentUidOrName m9nS3jj77zIr2i8YrqbNow

Confirm
Are you sure you want to perform this action?
Performing the operation "Delete" on target "agent 'Q5XrmUiehExczpCJ70_fet3JFQ3PKZyi5MoLR5QWEgM'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
Agent 'm9nS3jj77zIr2i8YrqbNow' removed.
  Removed: m9nS3jj77zIr2i8YrqbNow
```

{% endcode %}

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `pedm agent delete <agent> [agent...]`

**別名:** `pedm a delete`

**フラグ:**

| フラグ       | 説明                   |
| --------- | -------------------- |
| `--force` | 確認プロンプトを出さずに実行       |
| `agent`   | エージェントUID (必須、複数指定可) |

**例:**

```
My Vault> pedm agent delete agent_old123 --force

Agent deleted successfully
```

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.plugins.pedm import admin_plugin

plugin = admin_plugin.PedmPlugin(enterprise_loader)

agent_id = 'agent name or uid'
agent = plugin.agents.get_entity(agent_id)

response = plugin.modify_agents( remove_agents=[agent.agent_uid])
```

</details>

### エージェントのコレクション表示コマンド <a href="#agent-collection-command" id="agent-collection-command"></a>

特定のエージェントに紐づくリソースコレクションを表示します。エージェントで検出・登録されたリソースタイプ (OSビルド、アプリケーション、ユーザーアカウントなど)をすべて表示します。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `epm-agent collection`

**パラメータ:**

<table><thead><tr><th width="158">パラメータ</th><th>説明</th></tr></thead><tbody><tr><td><em>(positional)</em></td><td>エージェントUID</td></tr><tr><td><code>--type</code></td><td>結果を絞り込むコレクションタイプ番号</td></tr><tr><td><code>--verbose</code></td><td>グループ化された件数の代わりに、各コレクションのタイプ、UID、デコード済みJSON値を表示</td></tr></tbody></table>

**コレクションタイプ:**

| 値 | 名前        |
| - | --------- |
| 0 | OSビルド     |
| 1 | アプリケーション  |
| 2 | ユーザーアカウント |
| 3 | グループアカウント |
| 4 | OSバージョン   |

**例:**

{% code expandable="true" %}

```bash
My Vault > epm-agent collection abc123uid
```

{% endcode %}

</details>

<details>

<summary>DotNet SDK</summary>

**関数:**

{% code expandable="true" %}

```csharp
// Get collection UIDs linked to an agent (filter by CltAgent link type)
var collectionUids = plugin.CollectionLinks
    .GetLinksForObject(agent.AgentUid)
    .Where(link => link.LinkType == (int)PEDM.CollectionLinkType.CltAgent)
    .Select(link => link.CollectionUid);

// Resolve each collection UID
foreach (var uid in collectionUids)
{
    EpmCollection collection = plugin.Collections.GetEntity(uid);
    // collection.CollectionType → 0=OsBuild, 1=Application, 2=UserAccount, 3=GroupAccount, 4=OsVersion
    // collection.CollectionData → decrypted JSON bytes
}
```

{% endcode %}

</details>

<details>

<summary>Power Commander</summary>

**コマンド:** `Get-KeeperEpmAgentCollection`

**別名:** `kepm-agent-collection`

**パラメータ:**

<table><thead><tr><th width="218.99993896484375">パラメータ</th><th>説明</th></tr></thead><tbody><tr><td><code>-AgentUid</code></td><td>エージェントUIDまたはマシン名</td></tr><tr><td><code>-CollectionType</code></td><td>結果を絞り込む任意のコレクションタイプ番号</td></tr><tr><td><code>-CollectionVerbose</code></td><td>グループ化された件数の代わりに、各コレクションのタイプ、UID、デコード済みJSON値を表示</td></tr></tbody></table>

**コレクションタイプ:**

| 値 | 名前        |
| - | --------- |
| 0 | OSビルド     |
| 1 | アプリケーション  |
| 2 | ユーザーアカウント |
| 3 | グループアカウント |
| 4 | OSバージョン   |

**例:**

{% code expandable="true" %}

```ps1
PS > Get-KeeperEpmAgentCollection xerWlrlsaF_YLdHDx75c-g

CollectionType    Count
--------------    -----
OS Build (1)          1
User Account (3)    137
Group Account (4)   164

```

{% endcode %}

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `pedm agent collection <agent>`

**別名:** `pedm a c`, `pedm a collection`

**フラグ:**

| フラグ             | 説明                         |
| --------------- | -------------------------- |
| `-v, --verbose` | コレクションの値を含む詳細情報の表示         |
| `--type`        | コレクションタイプによる絞り込み (整数)      |
| `--format`      | 出力形式 (json、csv、tableのいずれか) |
| `--output`      | 指定ファイルへの保存                 |
| `agent`         | エージェントUID (必須)             |

**例:**

```
My Vault> pedm agent collection agent_abc123

Collection Type: OS_BUILD (1)
Count: 3

Collection Type: APPLICATION (2)
Count: 12
```

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.plugins.pedm import admin_plugin

plugin = admin_plugin.PedmPlugin(enterprise_loader)

agent_id = 'agent name or uid'
agent = plugin.agents.get_entity(agent_id)

resource_uids = {x.collection_uid for x in plugin.storage.collection_links.get_links_by_object(agent.agent_uid)}
collections = [plugin.collections.get_entity(x) or x for x in resource_uids]
```

</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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
