> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-references/device/general/wipe-device.md).

# デバイスを消去

### 説明

Windows または MacOS デバイスをワイプします。Windows デバイスでは、通常のワイプと保護されたワイプのどちらかを選択できます。MacOS デバイスでは、必要に応じて回復コードを指定し、消去動作を指定できます。

### デバイスをコンプライアンス除外グループに追加する

いつ *デバイスをコンプライアンス除外グループに追加* (`addToExclusionGroup`) が有効な場合、ワイプされた Windows デバイスはコンプライアンス除外グループに追加されます。そのグループ内のデバイスは、Autopilot 経由で再登録された後、より長いコンプライアンス猶予期間を受けます（これは **デバイスのオンボーディング除外を確認** runbook）。

既定では、グループはその **表示名** (`exclusionGroupName`）で識別されます。表示名は一意であることが保証されないため、代わりにグループをその **Object ID** (`exclusionGroupId`）で固定できます。Object ID が指定されると、 **常に上書きされます** 表示名より優先されるため、名前の競合によって誤ったグループが使用されることはありません。 `exclusionGroupId` は既定では非表示であり、runbook のカスタマイズを通じて設定することを想定しています。

グループは事前のプレフライト チェックで解決および検証されます。設定されたグループが存在しない場合、runbook は **前に** いずれのワイプ/削除/無効化アクションも実行せずに中止されるため、中途半端な状態が残ることはありません。グループへの追加は、Windows 以外のデバイス、およびデバイスが Entra ID から削除された場合はスキップされます（`removeAADDevice`).

#### グループを Object ID で固定する（推奨）

グループの Object ID を事前設定し、スイッチを有効にしたまま、フィールドを非表示のままにします。これにより、重複する表示名によるあいまいさを回避できます。

このための json 構成は次のとおりです:

```json
"rjgit-device_general_wipe-device": {
    "parameters": {
        "addToExclusionGroup": {
            "Default": true
        },
        "exclusionGroupId": {
            "Default": "00000000-0000-0000-0000-000000000000",
            "Hide": true
        },
        "exclusionGroupName": {
            "Hide": true
        }
    }
}
```

置き換え `00000000-0000-0000-0000-000000000000` をグループの Object ID に置き換えてください (Entra ID > Groups > *グループ* > **Object ID**).

#### 表示名でグループを固定する

表示名を使いたい場合（そしてそれが Tenant 内で一意である場合）は、 `exclusionGroupName` を事前設定し、 `exclusionGroupId` を空のままにして、名前が使用されるようにします。

このための json 構成は次のとおりです:

```json
"rjgit-device_general_wipe-device": {
    "parameters": {
        "addToExclusionGroup": {
            "Default": true
        },
        "exclusionGroupName": {
            "Default": "cfg - Intune - Windows - Compliance for unenrolled Autopilot devices (devices)",
            "Hide": true
        }
    }
}
```

### 場所

デバイス → 全般 → デバイスのワイプ

**Runbook の完全な名前**

rjgit-device\_general\_wipe-device

### 権限

#### アプリケーションの権限

* **種類**: Microsoft Graph
  * DeviceManagementManagedDevices.PrivilegedOperations.All
  * DeviceManagementManagedDevices.ReadWrite.All
  * DeviceManagementServiceConfig.ReadWrite.All
  * Device.Read.All
  * GroupMember.ReadWrite.All
* **種類**: WindowsDefenderATP
  * Machine.Read.All

#### RBAC ロール

* クラウド デバイス管理者

### パラメーター

#### DeviceId

対象デバイスのデバイス ID。

| プロパティ | 値    |
| ----- | ---- |
| 必須    | true |
| 既定値   |      |
| 種類    | 文字列  |

#### wipeDevice

「このデバイスをワイプしますか?」（最終値: true）または「デバイスをワイプしない」（最終値: false）を、実行するアクションとして選択できます。true に設定すると、runbook は Intune でこのデバイスに対してワイプ操作をトリガーします。false に設定すると、Intune でこのデバイスに対してワイプ操作はトリガーされません。

| プロパティ | 値       |
| ----- | ------- |
| 必須    | false   |
| 既定値   | True    |
| 種類    | Boolean |

#### useProtectedWipe

Windows のみ。true に設定すると、保護されたワイプを使用します。

| プロパティ | 値       |
| ----- | ------- |
| 必須    | false   |
| 既定値   | False   |
| 種類    | Boolean |

#### removeIntuneDevice

true に設定すると、Intune デバイス オブジェクトを削除します。

| プロパティ | 値       |
| ----- | ------- |
| 必須    | false   |
| 既定値   | False   |
| 種類    | Boolean |

#### removeAutopilotDevice

Windows のみ。「AutoPilot データベースからデバイスを削除しますか?」（最終値: true）または「デバイスを保持 / 気にしない」（最終値: false）を、実行するアクションとして選択できます。true に設定すると、runbook は AutoPilot データベースからデバイスを削除し、デバイスが Tenant から離脱できるようにもなります。false に設定すると、デバイスは AutoPilot データベースに残り、Tenant 内の別のユーザー/デバイスに再割り当てできます。

| プロパティ | 値       |
| ----- | ------- |
| 必須    | false   |
| 既定値   | False   |
| 種類    | Boolean |

#### removeAADDevice

「Entra ID からデバイスを削除しますか?」（最終値: true）または「デバイスを保持 / 気にしない」（最終値: false）を、実行するアクションとして選択できます。true に設定すると、runbook は Entra ID (Azure AD) からデバイス オブジェクトを削除します。false に設定すると、デバイス オブジェクトは Entra ID (Azure AD) に残ります。

| プロパティ | 値       |
| ----- | ------- |
| 必須    | false   |
| 既定値   | False   |
| 種類    | Boolean |

#### disableAADDevice

「Entra ID でデバイスを無効にしますか?」（最終値: true）または「デバイスを保持 / 気にしない」（最終値: false）を、実行するアクションとして選択できます。true に設定すると、runbook は Entra ID (Azure AD) でデバイス オブジェクトを無効にします。false に設定すると、デバイス オブジェクトは Entra ID (Azure AD) で有効なままになります。

| プロパティ | 値       |
| ----- | ------- |
| 必須    | false   |
| 既定値   | False   |
| 種類    | Boolean |

#### skipWipeIfAtRisk

true に設定すると、ワイプはそのデバイスの Microsoft Defender for Endpoint のリスク スコアが Medium または High ではない場合にのみ実行されます。これにより、セキュリティ インシデントに関与している可能性のあるデバイスのフォレンジック データ（例: ログ）がワイプによって破壊されるのを防ぎます。

| プロパティ | 値       |
| ----- | ------- |
| 必須    | false   |
| 既定値   | False   |
| 種類    | Boolean |

#### addToExclusionGroup

Windows のみ。true に設定すると、デバイスは 'exclusionGroupName' で参照されるコンプライアンス除外グループに追加されます。これにより、Autopilot 経由で再登録された後、デバイスにより長いコンプライアンス猶予期間が付与されます（'Check Device Onboarding Exclusion' runbook を参照）。

| プロパティ | 値       |
| ----- | ------- |
| 必須    | false   |
| 既定値   | False   |
| 種類    | Boolean |

#### exclusionGroupName

デバイスを追加する際に 'addToExclusionGroup' が有効な場合の、コンプライアンス除外グループの表示名。

| プロパティ | 値                                                                              |
| ----- | ------------------------------------------------------------------------------ |
| 必須    | false                                                                          |
| 既定値   | cfg - Intune - Windows - Compliance for unenrolled Autopilot devices (devices) |
| 種類    | 文字列                                                                            |

#### exclusionGroupId

コンプライアンス除外グループの Object ID。指定すると、常に 'exclusionGroupName' より優先されます（名前の競合を回避します）。既定では非表示で、Runbook Customization を通じて設定することを想定しています。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   |       |
| 種類    | 文字列   |

#### macOsRecoveryCode

MacOS のみ。旧いデバイス用の回復コードです。新しいデバイスでは不要な場合があります。

| プロパティ | 値      |
| ----- | ------ |
| 必須    | false  |
| 既定値   | 123456 |
| 種類    | 文字列    |

#### macOsObliterationBehavior

MacOS のみ。ワイプ中の OS 消去動作を制御します。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | 既定    |
| 種類    | 文字列   |

[Runbook Reference の概要に戻る](/ja/zi-dong-hua/runbooks/runbook-references.md)


---

# 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.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-references/device/general/wipe-device.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.
