# ジョブ: KeeperAdminCLI実行ガイド

## ジョブ実行ガイド:各ジョブの実行方法 (KeeperAdminCLIとAPI)

本ガイドでは、各ジョブの想定される実行方法、必須または有用なパラメータ、およびパラメータが必要な場合に**KeeperAdminCLI**または**トリガーAPI**(curl)で利用できる具体例について取り扱います。

**要件**:

* KeeperPrivilegeManager (KPM)が稼働していること。
* KeeperAdminCLIを**管理者として**実行すること(実行API/トリガーAPIは管理者権限を要する)。
* 既定のKPM URL: `https://localhost:6889` (`--port 6889` または `--url <url>` で上書き)。

**ジョブの実行方法**

1. **パラメータなし**: `KeeperAdminCLI --port 6889 jobs run --id <jobId>` (POST `/api/Jobs/{jobId}/run`、ボディなし)。
2. **パラメータあり**: `/api/Jobs/{jobId}/trigger` (または `/evaluate`) にJSONボディ付きでPOSTする。KeeperAdminCLIは現状未対応のため、下記のとおり**curl**などを使用する。

### クイックリファレンス: パラメータ不要で KeeperAdminCLI のみ実行できるジョブ

以下のジョブは **KeeperAdminCLI のみ** (curl 不要) で実行できます。

| ジョブID                                    | コマンド                                                                                |
| ---------------------------------------- | ----------------------------------------------------------------------------------- |
| FileInventory                            | `KeeperAdminCLI --port 6889 jobs run --id 68112CE4-A2A8-4243-83C9-90BF8D2188A0`     |
| ExecutionGrantStartupCleanup             | `KeeperAdminCLI --port 6889 jobs run --id ExecutionGrantStartupCleanup`             |
| locale-cache-cleanup                     | `KeeperAdminCLI --port 6889 jobs run --id locale-cache-cleanup`                     |
| UserInventory                            | `KeeperAdminCLI --port 6889 jobs run --id 3A124C4D-2D41-4174-9A13-998D1683DADC`     |
| ephemeral-account-cleanup-if-unused      | `KeeperAdminCLI --port 6889 jobs run --id ephemeral-account-cleanup-if-unused`      |
| ephemeral-orphan-profile-folders-cleanup | `KeeperAdminCLI --port 6889 jobs run --id ephemeral-orphan-profile-folders-cleanup` |
| log-version-info                         | `KeeperAdminCLI --port 6889 jobs run --id log-version-info`                         |
| FileAccessStartupCleanup                 | `KeeperAdminCLI --port 6889 jobs run --id FileAccessStartupCleanup`                 |
| process-configuration-policies           | `KeeperAdminCLI --port 6889 jobs run --id process-configuration-policies`           |
| ApplyFileAccessPolicies                  | `KeeperAdminCLI --port 6889 jobs run --id ApplyFileAccessPolicies`                  |
| agent\_registration                      | `KeeperAdminCLI --port 6889 jobs run --id agent_registration`                       |
| keeperagent-silent-expiration-check      | `KeeperAdminCLI --port 6889 jobs run --id keeperagent-silent-expiration-check`      |
| InventoryBasic                           | `KeeperAdminCLI --port 6889 jobs run --id 60260BA2-0713-4292-8A93-974E0E329BE1`     |
| ShowAgent                                | `KeeperAdminCLI --port 6889 jobs run --id ShowAgent`                                |
| least-privilege-check                    | `KeeperAdminCLI --port 6889 jobs run --id least-privilege-check`                    |
| RevertFileAccess                         | `KeeperAdminCLI --port 6889 jobs run --id RevertFileAccess`                         |
| StartKeeperClient                        | `KeeperAdminCLI --port 6889 jobs run --id StartKeeperClient`                        |

パラメータが**必要な**ジョブは、JSON ボディ付きの `POST /api/Jobs/{jobId}/trigger` (または `/evaluate`) が必要です。KeeperAdminCLI がコンテキストの受け渡しに対応するまで、各ジョブの例のとおり**curl**を使用してください。

***

### 68112CE4-A2A8-4243-83C9-90BF8D2188A0 — FileInventory

**名前**: FileInventory\
**実行方法**: スケジュール (7200分ごと) または手動。ファイルインベントリを実行し、KeeperLogger/KeeperApiに報告します。\
**必須パラメータ**: なし **任意パラメータ**: なし

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id 68112CE4-A2A8-4243-83C9-90BF8D2188A0
```

***

### ExecutionGrantStartupCleanup

**名前**: Execution Grant Startup Cleanup\
**実行方法**: 起動時(イベント)または手動。期限切れの実行許可および孤立したexpire-exec-grantジョブファイルを削除します。\
**必須パラメータ**: なし\
**任意パラメータ**: `KeeperApiBaseUrl` (既定: `https://127.0.0.1:6889`)

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id ExecutionGrantStartupCleanup
```

***

### privilege-elevation-policy-controls

**名前**: Privilege Elevation Policy Controls\
**実行方法**: **PolicyEvaluationPending**イベントにより起動します (KeeperPolicyから、特権昇格要求がPENDINGのとき)。完全なポリシーコンテキストなしの手動実行は想定していません。\
**必須パラメータ**: `SessionId`、`RespondToTopic`\
**任意パラメータ**: `ControlList`、`CommandLine`、`UserName`、`RequestId`、`JobId`、`FileName`、`FilePath`、`EventType` (PrivilegeElevation)、`KeeperApiBaseUrl`

**例 (パラメータ付き・API経由)**:ポリシー保留フローのシミュレーション(テストなど)に限り使用します。通常はMQTT/イベントにより起動します。

```
curl -k -X POST "https://localhost:6889/api/Jobs/privilege-elevation-policy-controls/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"SessionId\":\"test-session\",\"RespondToTopic\":\"test/topic\",\"EventType\":\"PrivilegeElevation\",\"FileName\":\"cmd.exe\",\"FilePath\":\"C:\\\\Windows\\\\System32\\\\cmd.exe\",\"RequestId\":\"req-1\",\"UserName\":\"DOMAIN\\\\User\"}"
```

*注:実MQTTの応答トピックなしで手動実行してもフローは完結しません。ジョブは動作しうる場合がありますが、応答の宛先がありません。*

***

### LaunchFileAccess

**名前**: Launch File Access Grant\
**実行方法**: ファイルアクセスポリシーが許可し (かつコントロールを満たし) たあと、**LaunchFileAccess**カスタムイベントにより起動します。一時的なファイルアクセスを付与し、必要に応じて実行ファイルを起動します。\
**必須パラメータ**: `FilePath` **任意パラメータ**: `RequestId`、`FileName`、`UserIdentifier`、`UserName`、`PolicyUid`、`ControlList`、`Justification`、`ApprovalUid`、`GrantedAccess`、`DurationMinutes`、`KeeperApiBaseUrl`、`IsFromHook`、`CommandLine`

**例 (パラメータ付き・API経由)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/LaunchFileAccess/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"FilePath\":\"C:\\\\Windows\\\\System32\\\\notepad.exe\",\"UserName\":\"DOMAIN\\\\User\",\"FileName\":\"notepad.exe\"}"
```

***

### StartKeeperClient

**名前**: Start Keeper Client for User Session\
**実行方法: デスクトップが利用可能なとき、UserLogin、SessionConnect、StartKeeperClient、またはExistingSession**により起動します。ユーザーセッションでKeeperClientを起動します。\
**必須パラメータ**: `SessionId`、`UserName` (スキーマ上。タスクはexeに渡しません)\
**任意パラメータ**: `Domain`、`EventType`、`IsInteractive`

**例 (最小構成・KeeperAdminCLI)**: セッションコンテキストなしでクライアントを起動しうる場合があります。

```
KeeperAdminCLI --port 6889 jobs run --id StartKeeperClient
```

**例 (コンテキスト付き・API経由)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/StartKeeperClient/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"SessionId\":\"1\",\"UserName\":\"DOMAIN\\\\User\"}"
```

***

### locale-cache-cleanup

**名前**: Locale Cache Cleanup\
**実行方法**: スケジュール (30分ごと) または手動。ログオンしていないユーザーのロケールキャッシュを削除します。\
**必須パラメータ**: なし\
**任意パラメータ**: なし

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id locale-cache-cleanup
```

***

### composite-risk-evaluation

**名前**: Composite Risk Evaluation\
**実行方法: ポリシー/リスクロジックがファイル/ユーザー/マシンコンテキスト付きで`/api/Jobs/{jobId}/evaluate`から同期**で呼び出されます。通常は「run」「trigger」ではなく**evaluate**で結果を取得します。\
**必須パラメータ**: `FilePath`、`UserName`、`MachineName`、`TargetRiskScore`\
**任意パラメータ**: `LocationRiskJobId`、`UserRiskJobId`、`ApplicationRiskJobId`、`MachineRiskJobId` (ジョブ内の既定値あり)

**例 (evaluate API・同期、合格/不合格を返す)**:\
`KeeperApiBaseUrl`を含め、ジョブがサブリスクジョブを呼び出せるようにします。未指定の場合、エグゼキュータは構成へフォールバックする場合があります。

```
curl -k -X POST "https://localhost:6889/api/Jobs/composite-risk-evaluation/evaluate" \
  -H "Content-Type: application/json" \
  -d "{\"FilePath\":\"C:\\\\Windows\\\\System32\\\\notepad.exe\",\"UserName\":\"DOMAIN\\\\User\",\"MachineName\":\"MYPC\",\"TargetRiskScore\":5.0,\"KeeperApiBaseUrl\":\"https://127.0.0.1:6889\"}"
```

***

### file-access-policy-controls

**名前**: File Access Policy Controls\
**実行方法: FileAccess向けPolicyEvaluationPending**により起動します。単体での手動実行は想定していません。\
**必須パラメータ**: `SessionId`、`RespondToTopic`\
**任意パラメータ**: `ControlList`、`UserName`、`RequestId`、`FilePath`、`FileName`、`EventType` (FileAccess)、`KeeperApiBaseUrl`、`DurationMinutes`

**例 (パラメータ付き・API経由・テストのみ)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/file-access-policy-controls/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"SessionId\":\"s1\",\"RespondToTopic\":\"test/topic\",\"EventType\":\"FileAccess\",\"FileName\":\"file.txt\",\"FilePath\":\"C:\\\\temp\\\\file.txt\",\"RequestId\":\"r1\",\"UserName\":\"DOMAIN\\\\User\"}"
```

***

### 3A124C4D-2D41-4174-9A13-998D1683DADC — UserInventory

**名前**: UserInventory\
**実行方法**: スケジュール (7200分ごと) またはAgentRegistered/Startup。ユーザーインベントリを実行します。\
**必須パラメータ**: なし (httpportはエグゼキュータが注入されます) **任意パラメータ**: なし

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id 3A124C4D-2D41-4174-9A13-998D1683DADC
```

***

### ephemeral-account-cleanup-if-unused

**名前**: Ephemeral Account Cleanup If Unused\
**実行方法**: スケジュール (30秒ごと) または手動。KeeperUserSessionとしてプロセスが動作していない場合、エフェメラルアカウントを削除します。\
**必須パラメータ**: なし\
**任意パラメータ**: なし

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id ephemeral-account-cleanup-if-unused
```

***

### create-approved-request-from-policy-result

**名前**: Create Approved Request From Policy Result\
**実行方法: ポリシーがALLOWを返したときPolicyEvaluationResult**により起動します。承認済み要求をサーバー側で作成します。\
**必須パラメータ**: `RequestId`、`Response`\
**任意パラメータ**: `FileName`、`FilePath`、`CommandLine`、`UserName`、`EventType`、`OriginalEventType`、`RespondToTopic`、`KeeperApiBaseUrl`

**例 (パラメータ付き・API経由)**: `Response`が`ALLOW`のときのみ意味があります。

```
curl -k -X POST "https://localhost:6889/api/Jobs/create-approved-request-from-policy-result/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"RequestId\":\"req-123\",\"Response\":\"ALLOW\",\"FileName\":\"cmd.exe\",\"FilePath\":\"C:\\\\Windows\\\\System32\\\\cmd.exe\",\"UserName\":\"DOMAIN\\\\User\",\"OriginalEventType\":\"PrivilegeElevation\"}"
```

***

### ephemeral-orphan-profile-folders-cleanup

**名前**: Ephemeral Orphan Profile Folders Cleanup\
**実行方法**: スケジュール (5分ごと) または手動。孤立したKeeperUserSessionプロファイルフォルダを削除します (Windows)。\
**必須パラメータ**: なし\
**任意パラメータ**: なし

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id ephemeral-orphan-profile-folders-cleanup
```

***

### user-risk-assessment

**名前**: User Risk Assessment\
**実行方法: composite-risk-evaluationまたはポリシーからevaluate**により呼び出されます。\
**必須パラメータ**: `UserName`\
**任意パラメータ**: `RiskAssessmentExecutable`、`RiskAssessmentArguments`、`KeeperApiBaseUrl` (コンテキストから) **例 (evaluate API)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/user-risk-assessment/evaluate" \
  -H "Content-Type: application/json" \
  -d "{\"UserName\":\"DOMAIN\\\\User\"}"
```

***

### custom-event-example

**名前**: Custom Event Handler Example\
**実行方法: カスタムイベント(例:MyCustomEvent)により起動します。ジョブは既定で無効**です。\
**必須パラメータ**: なし **任意パラメータ**: `MachineName`、`UserName`、`Source`

**例 (KeeperAdminCLI・先にジョブを有効化)**:

```
KeeperAdminCLI --port 6889 jobs run --id custom-event-example
```

またはコンテキスト付きでイベントからトリガーします。

```
curl -k -X POST "https://localhost:6889/api/Jobs/custom-event-example/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"MachineName\":\"MYPC\",\"UserName\":\"User\",\"Source\":\"Manual\"}"
```

***

### LaunchApprovedRequest

**名前**: Launch Approved Request\
**実行方法**: **LaunchApprovedRequest**イベントにより起動します。`ApprovalUid` (keeperAgent由来)または`RequestId` / `FilePath` / `CommandLine` (ポリシージョブ由来) のいずれかです。昇格あり/なしで起動します。\
**必須パラメータ**: `ApprovalUid` **または** (起動パス用の`FilePath`) **任意パラメータ**: `RequestId`、`CommandLine`、`EventType`、`UserName`、`KeeperApiBaseUrl`

**例 (ApprovalUid・承認ワークフローから)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/LaunchApprovedRequest/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"ApprovalUid\":\"<approval-uid-from-keeper>\"}"
```

**例 (パス・ポリシージョブからの例)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/LaunchApprovedRequest/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"FilePath\":\"C:\\\\Windows\\\\System32\\\\cmd.exe\",\"CommandLine\":\"\",\"EventType\":\"PrivilegeElevation\",\"UserName\":\"DOMAIN\\\\User\"}"
```

***

### LaunchNativeElevation

**名前**: Launch Native OS Elevation\
**実行方法: ポリシーが適用されないEnforcementDisabled時にLaunchNativeElevation**により起動します。OSのUAC/sudoで起動します。\
**必須パラメータ**: `FilePath`\
**任意パラメータ**: `FileName`、`CommandLine`、`WorkingDirectory`、`RequestId`、`UserName`、`KeeperApiBaseUrl`、`RespondToTopic`、`SessionId`

**例 (パラメータ付き・API経由)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/LaunchNativeElevation/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"FilePath\":\"C:\\\\Windows\\\\System32\\\\cmd.exe\",\"UserName\":\"DOMAIN\\\\User\",\"FileName\":\"cmd.exe\"}"
```

***

### policy-evaluation-error-handler

**名前**: Policy Evaluation Error Handler\
**実行方法: デスクトップでポリシー評価が失敗したときHookErrorEvent**により起動します。DENYを送り、エラーを表示します。\
**必須パラメータ**: `RequestId` (推奨)\
**任意パラメータ**: `SessionId`、`RespondToTopic`、`EventType`、`ErrorReason`、`FileName`、`FilePath`、`CommandLine`、`UserName`、`KeeperApiBaseUrl`

**例 (パラメータ付き・API経由)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/policy-evaluation-error-handler/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"RequestId\":\"req-1\",\"ErrorReason\":\"MessageHelper not initialized\"}"
```

***

### policy-evaluation-error-handler-headless

**名前**: Policy Evaluation Error Handler (Headless)\
**実行方法**: ヘッドレス(デスクトップなし)向けです。上記と同様です。\
**必須パラメータ**: `RequestId` (推奨) **任意パラメータ**: policy-evaluation-error-handlerと同じです。

**例**:上記と同様です。ジョブIDを `policy-evaluation-error-handler-headless` に置き換えます。

***

### log-version-info

**名前**: Log Version Information\
**実行方法**: **LogVersionInfo**または手動により起動します。コンポーネントのバージョンをログに記録します。\
**必須パラメータ**: なし **任意パラメータ**: なし

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id log-version-info
```

***

### monitor-and-notify-notification

**名前**: Monitor and Notify Notification\
**実行方法: MonitorAndNotifyポリシーが発動したときMonitorAndNotifyNotification**により起動します。\
**必須パラメータ**: `Message`\
**任意パラメータ**: `Username`、`RequestId`、`SessionId`、`RequiresAcknowledgement`、`KeeperApiBaseUrl`

**例 (パラメータ付き・API経由)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/monitor-and-notify-notification/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"Message\":\"Your action is being monitored.\",\"RequiresAcknowledgement\":false}"
```

***

### FileAccessStartupCleanup

**名前**: FileAccess Startup Cleanup\
**実行方法**: 起動時または手動。期限切れのファイルアクセス許可および孤立したrevertジョブを削除します。\
**必須パラメータ**: なし\
**任意パラメータ**: `KeeperApiBaseUrl`

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id FileAccessStartupCleanup
```

***

### process-configuration-policies

**名前**: Process Configuration Policies\
**実行方法**: **PolicyPreprocessingCompleted**により起動します。SettingsUpdateおよびJobUpdateポリシーを適用します。\
**必須パラメータ**: なし\
**任意パラメータ**: `KeeperApiBaseUrl`、`JobsDirectory`、`PluginsDirectory`、`AppSettingsPath`

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id process-configuration-policies
```

***

### file-risk-assessment

**名前**: File Risk Assessment\
**実行方法: composite-riskまたはポリシーからevaluate**により呼び出されます。\
**必須パラメータ**: `FilePath`\
**任意パラメータ**: `FileRiskExecutable`、`SelectedVendor`

**例 (evaluate API)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/file-risk-assessment/evaluate" \
  -H "Content-Type: application/json" \
  -d "{\"FilePath\":\"C:\\\\Windows\\\\System32\\\\notepad.exe\"}"
```

***

### send-audit-event

**名前**: Send Audit Event\
**実行方法: 監査ペイロード付きでSendAuditEvent**により起動します。\
**必須パラメータ**: ジョブ上はなし。ペイロードはプレースホルダを使用します。\
**任意パラメータ**: `RequestId`、`Timestamp`、`RequestUid`、`PolicyType`、`UserName`、`TargetInfo`、`EvaluationStatus`、`AuditEventType`

**例 (パラメータ付き・API経由)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/send-audit-event/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"RequestId\":\"r1\",\"AuditEventType\":\"PrivilegeElevation\",\"Timestamp\":\"2026-02-24T12:00:00Z\",\"UserName\":\"DOMAIN\\\\User\",\"EvaluationStatus\":\"ALLOW\"}"
```

***

### ApplyFileAccessPolicies

**名前**: Apply FileAccess Policies\
**実行方法**: **FileAccessPoliciesChanged**または**PolicySyncCompleted**、または手動により起動します。保留中の適用対象からFileAccess DENY ACLを適用します。\
**必須パラメータ**: なし\
**任意パラメータ**: `KeeperApiBaseUrl`

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id ApplyFileAccessPolicies
```

***

### agent\_registration

**名前**: Registration\
**実行方法**: 起動時または手動。エージェントを登録します。\
**必須パラメータ**: なし\
**任意パラメータ**: なし

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id agent_registration
```

***

### location-risk-assessment

**名前**: Location Risk Assessment\
**実行方法: composite-riskまたはポリシーからevaluate**により呼び出されます。\
**必須パラメータ**: `FilePath`\
**任意パラメータ**: `RiskAssessmentExecutable`、`RiskAssessmentArguments`

**例 (evaluate API)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/location-risk-assessment/evaluate" \
  -H "Content-Type: application/json" \
  -d "{\"FilePath\":\"C:\\\\Windows\\\\System32\\\\notepad.exe\"}"
```

***

### send-toast

**名前**: Send Toast\
**実行方法**: **SendAuditEvent**または他の呼び出し元から、メッセージ/重大度付きで起動します。\
**必須パラメータ**: なし(コンテキストなしではメッセージは空です)。\
**任意パラメータ**: `title`、`message`、`severity`、`targetUser`

**例 (パラメータ付き・API経由)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/send-toast/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"title\":\"Test\",\"message\":\"Hello from admin\",\"severity\":\"Info\"}"
```

***

### expire-exec-grant-\* (例: expire-exec-grant-4e85aed0bf2d4f38a4c25a80413aa7b8)

**名前**: Expire Execution Grant - \<ExecutableName>\
**実行方法**: 許可の失効時刻にスケジュール、または手動。許可IDはジョブIDおよびタスク本文に含まれます。\
**必須パラメータ**: なし (grantIdはジョブ定義内にあります)\
**任意パラメータ**: なし

**例 (KeeperAdminCLI)**: 当該許可用に作成されたジョブIDをそのまま使用します。

```
KeeperAdminCLI --port 6889 jobs run --id expire-exec-grant-4e85aed0bf2d4f38a4c25a80413aa7b8
```

***

### RevertFileAccess

**名前**: Revert File Access\
**実行方法: スケジュール、RevertFileAccessイベント、または起動時。期限切れのファイルアクセス許可を元に戻します。ジョブは既定で無効**です。\
**必須パラメータ**: なし\
**任意パラメータ**: `GrantId` (特定の許可。空なら期限切れをすべて元に戻す)、`KeeperApiBaseUrl`

**例 (KeeperAdminCLI・必要なら先にジョブを有効化)**:

```
KeeperAdminCLI --port 6889 jobs run --id RevertFileAccess
```

***

### GrantFileAccess

**名前**: Grant File Access\
**実行方法: 承認/MFA/正当化によりアクセスが許可されたときGrantFileAccess**イベントにより起動します。\
**必須パラメータ**: スキーマ上はなし。実質的な許可には`RestrictionId`または`FilePath` + `UserName`のいずれかが必要です。\
**任意パラメータ**: `RestrictionId`、`FilePath`、`UserName`、`DurationMinutes`、`ApprovalUid`、`Justification`、`ControlMethod`、`KeeperApiBaseUrl`

**例 (パラメータ付き・API経由)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/GrantFileAccess/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"FilePath\":\"C:\\\\temp\\\\report.docx\",\"UserName\":\"DOMAIN\\\\User\",\"DurationMinutes\":60}"
```

***

### default-policy-controls-headless

**名前**: Default Policy Controls (Headless)\
**実行方法: hasdesktop=false (ヘッドレス)のときPolicyEvaluationPending**により起動します。転送または拒否します。\
**必須パラメータ**: `SessionId`、`RespondToTopic`\
**任意パラメータ**: default-policy-controlsと同じです。

**例**:SessionIdとRespondToTopic付きでトリガーAPIを使用します。通常はポリシーから呼び出され、手動実行は想定していません。

***

### keeperagent-silent-expiration-check

**名前**: KeeperAgent Silent Expiration Check\
**実行方法**: スケジュール(1440分ごと)または手動。条件を満たす場合、keeperAgentをサイレントモードで実行します。\
**必須パラメータ**: なし\
**任意パラメータ**: なし

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id keeperagent-silent-expiration-check
```

***

### default-policy-controls

**名前**: Default Policy Controls\
**実行方法: CommandLine/Custom (PrivilegeElevation/FileAccess以外)向けPolicyEvaluationPending**により起動します。MFA/正当化/承認を実行します。\
**必須パラメータ**: `SessionId`、`RespondToTopic`\
**任意パラメータ**: `ControlList`、`CommandLine`、`UserName`、`RequestId`、`JobId`、`EventType`、`OriginalEventType`、`KeeperApiBaseUrl`

**例**: 完全なコンテキスト付きでトリガーAPIを使用します。通常はポリシーから呼び出されます。

***

### LaunchPrivilegeElevation

**名前**: Launch Privilege Elevation\
**実行方法**: **LaunchPrivilegeElevation**により起動します。ポリシーから`ApprovalUid`または`FilePath` / `CommandLine` / `UserName`が渡されます。\
**必須パラメータ**: `ApprovalUid` **または** `FilePath` (パスベース起動)\
**任意パラメータ**: `RequestId`、`FileName`、`CommandLine`、`UserName`、`MachineName`、`WorkingDirectory`、`KeeperApiBaseUrl`、`RespondToTopic`、`SessionId`、`EventType`、`DurationMinutes`

**例 (ApprovalUid)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/LaunchPrivilegeElevation/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"ApprovalUid\":\"<approval-uid>\"}"
```

**例 (パス)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/LaunchPrivilegeElevation/trigger" \
  -H "Content-Type: application/json" \
  -d "{\"FilePath\":\"C:\\\\Windows\\\\System32\\\\cmd.exe\",\"CommandLine\":\"\",\"UserName\":\"DOMAIN\\\\User\",\"EventType\":\"PrivilegeElevation\"}"
```

***

### machine-risk-assessment

**名前**: Machine Risk Assessment\
**実行方法: composite-riskまたはポリシーからevaluate**により呼び出されます。\
**必須パラメータ**: `MachineName`\
**任意パラメータ**: `RiskAssessmentExecutable`、`RiskAssessmentArguments`

**例 (evaluate API)**:

```
curl -k -X POST "https://localhost:6889/api/Jobs/machine-risk-assessment/evaluate" \
  -H "Content-Type: application/json" \
  -d "{\"MachineName\":\"MYPC\"}"
```

***

### 60260BA2-0713-4292-8A93-974E0E329BE1 — InventoryBasic

**名前**: InventoryBasic\
**実行方法**: スケジュール(7200分ごと)またはAgentRegistered/Startupで実行されます。\
**必須パラメータ**: なし\
**任意パラメータ**: なし

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id 60260BA2-0713-4292-8A93-974E0E329BE1
```

***

### ShowAgent

**名前**: Show Keeper Agent\
**実行方法**: **ShowAgent** (例: KeeperClientメニューから) または手動により起動します。ユーザーデスクトップでkeeperAgent UIを起動します。\
**必須パラメータ**: なし\
**任意パラメータ**: なし

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id ShowAgent
```

***

### least-privilege-check

**名前**: Least Privilege Enforcement\
**実行方法**: **LeastPrivilegeCheck**または手動により起動します。ポリシーに従い、保護されていないユーザーをadministratorsグループから削除します。\
**必須パラメータ**: なし\
**任意パラメータ**: `MachineName`、`UserName`

**例 (KeeperAdminCLI)**:

```
KeeperAdminCLI --port 6889 jobs run --id least-privilege-check
```


---

# Agent Instructions: 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:

```
GET https://docs.keeper.io/keeperpam/jp/endpoint-privilege-manager/reference/jobs-run-guide-keeperadmincli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
