> 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/org/devices/outphase-devices.md).

# デバイスを段階的に廃止

### 説明

この runbook は、デバイス ID またはシリアル番号のカンマ区切りリストに基づいて、複数のデバイスを段階的に廃止します。必要に応じて、Intune でデバイスをワイプし、対応する Entra ID のデバイス オブジェクトを削除または無効化できます。さらに、各デバイスに Microsoft Defender for Endpoint のタグを付けて、修復対象から除外されていることを示すこともできます。注: 除外タグはデバイスに適用されますが、ポータルで一度（\[デバイス] > \[タグの管理] > \[新しいタグの作成]）作成されるまでは、Defender ポータルの「タグ」フィルターには表示されません。

### Microsoft Defender for Endpoint の除外タグ

Microsoft Defender for Endpoint にはネイティブの **除外状態** （デバイス インベントリ フィルターでは *除外済み* / *除外されていない*と表示されます）。この状態は Defender ポータルからのみ設定でき、 **API はありません** デバイスのネイティブな除外状態をプログラムで設定するための。

ネイティブの除外状態を自動化できないため、この runbook では代わりにカスタム デバイス タグ（既定値 `ExcludeFromRemediation`）を *Microsoft Defender for Endpoint からデバイスを除外する* が有効になっている場合に適用します。リスト内の各デバイスは Entra ID のデバイス ID で検索され、 `POST /api/machines/{id}/tags`経由でタグ付けされ、除外されたデバイスをフィルターして対象にするために使用できるマーカーが提供されます。

#### 一度だけの設定: タグをフィルター可能にする

ポータルの **「タグ」** フィルターには、ポータル経由で作成されたタグのみが一覧表示されます。API だけで設定されたタグはデバイスに付与され、デバイス ページでは表示されますが、 **一致** それだけでは「タグ」フィルターには表示されません。

除外タグを表示可能にし、 [Defender デバイス インベントリ](https://security.microsoft.com/machines)でフィルターに使用できるようにするには、1 つのクライアントをポータルから手動で一度タグ付けする必要があります（デバイスを選択 > **タグの管理** > 「新しいタグの作成」、同じタグ値を正確に使用）。この 1 回限りの手順の後、タグは既知のフィルター可能なタグになり、この runbook で大規模にデバイスへ適用できるようになります。

> **注意:** このタグはラベルにすぎず、デバイスのネイティブな除外状態は設定されず、単独では修復効果もありません。効果があるのは、Defender のデバイス グループまたは自動化ルールがこのタグ値に一致するよう明示的に構成されている場合だけです。このようなルールはポータルの **「タグ」** フィルターとは独立してタグ値そのものに直接一致するため、この 1 回限りの手動手順は、ポータル UI でタグをフィルター対象として選択できるかどうかにのみ影響します。

Intune で見つからないシリアル番号指定のデバイスには Entra ID のデバイス ID がないため、Defender ではタグ付けされません。

参照 [デバイスタグの作成と管理](https://learn.microsoft.com/defender-endpoint/machine-tags#create-tags) 詳細について。

### 場所

組織 → デバイス → Outphase Devices

**完全な Runbook 名**

rjgit-org\_devices\_outphase-devices

### アクセス許可

#### アプリケーションのアクセス許可

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

#### RBAC ロール

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

### パラメーター

#### DeviceListChoice

リストにデバイス ID が含まれるか、シリアル番号が含まれるかを決定します。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | true  |
| 既定値   | 0     |
| 種類    | Int32 |

#### DeviceList

デバイス ID またはシリアル番号のカンマ区切りリスト。

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

#### intuneAction

デバイスをワイプするか、Intune から削除するか、Intune 操作をスキップするかを決定します。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | 2     |
| 種類    | Int32 |

#### aadAction

Entra ID のデバイスを削除するか、無効にするか、Entra ID の操作をスキップするかを決定します。

| プロパティ | 値     |
| ----- | ----- |
| 必須    | false |
| 既定値   | 2     |
| 種類    | Int32 |

#### wipeDevice

intuneAction から派生した内部フラグ。

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

#### removeIntuneDevice

intuneAction から派生した内部フラグ。

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

#### removeAutopilotDevice

「デバイスを Autopilot から削除する」（最終値: true）または「デバイスを Autopilot に保持する」（最終値: false）で、デバイスを Autopilot データベースから削除するかどうかを制御します。

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

#### removeAADDevice

aadAction から派生した内部フラグ。

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

#### disableAADDevice

aadAction から派生した内部フラグ。

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

#### excludeFromDefender

true に設定すると、各デバイスに指定された除外タグを使用して Microsoft Defender for Endpoint でタグ付けされます。false に設定すると、Defender の手順は完全にスキップされます。

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

#### defenderExclusionTag

Microsoft Defender for Endpoint でデバイスに追加され、除外済みであることを示すタグ。既定値は "ExcludeFromRemediation" です。

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

[Runbook リファレンスの概要に戻る](/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/org/devices/outphase-devices.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.
