> 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/dedup-device-names_scheduled.md).

# デバイス名の重複排除 - 定期実行

{% hint style="info" %}
これはスケジュール実行の runbook です。単一のオブジェクトでトリガーされるのではなく、繰り返しのスケジュールで実行されるように設計されています。参照してください [スケジュール設定](/ja/zi-dong-hua/runbooks/scheduling.md) runbook のスケジュールを構成する方法の詳細について。
{% endhint %}

### 説明

このスケジュール済み runbook は、Intune で管理されているすべてのデバイスを照会し、同じ表示名を共有するデバイスを特定します。重複する各セットについて、最も最近登録されたデバイスは、構成可能なプレフィックスの後に指定した総長に合わせてゼロ埋めされたランダムな数字を続けた生成名に変更され、その名前は一致する Windows Autopilot デバイス オブジェクトに保持されます。任意の OS フィルターにより、処理対象を特定のプラットフォーム（Windows、macOS、またはその他）に制限できます。All に設定すると、すべてのプラットフォームのデバイスが評価されます。

### 場所

Organization → Devices → デバイス名の重複排除 (スケジュール済み)

**Runbook の完全名**

rjgit-org\_devices\_dedup-device-names\_scheduled

### 詳細

| プロパティ    | 値                                                                                       |
| -------- | --------------------------------------------------------------------------------------- |
| バージョン    | 1.0.2                                                                                   |
| 必要なモジュール | <p>RealmJoin.RunbookHelper (>= 0.8.9)<br>Microsoft.Graph.Authentication (>= 2.39.0)</p> |
| スケジュール可能 | はい                                                                                      |

### 注意

前提条件:

* マネージド ID には、DeviceManagementManagedDevices.ReadWrite.All および DeviceManagementServiceConfig.ReadWrite.All の Graph アプリケーション権限が割り当てられている必要があります。
* updateDeviceProperties による Autopilot の表示名の変更は、次回のデバイス同期時に有効になり、ポータルにすぐには反映されない場合があります。

パラメーターの相互作用:

* NameLength は NamePrefix の文字数より厳密に大きくなければなりません。この差が、追加されるランダムな数字の桁数を決定します（例: NamePrefix が "CORP" で NameLength が 8 の場合、"CORP4271" のような名前になります）。
* runbook は起動時にこの制約を検証し、違反している場合は即座に失敗します。

一般的な使用例:

* 再登録、OS の再イメージ化、またはクローン作業によって発生するデバイス名の重複を自動的に解決するため、毎週スケジュールします。
* 冪等な Autopilot 同期パスにより、初回実行時でも一意のデバイスが Autopilot で正規化されます。

### アクセス許可

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

* **種類**：Microsoft Graph
  * DeviceManagementManagedDevices.ReadWrite.All
    * *すべての Intune 管理デバイスを一覧表示し、setDeviceName を使用して重複を変更します*
  * DeviceManagementServiceConfig.ReadWrite.All
    * *windowsAutopilotDeviceIdentities を読み取り、updateDeviceProperties を使用して新しい名前を同期します*
  * DeviceManagementManagedDevices.PrivilegedOperations.All
    * *重複の名前変更時に特権付き setDeviceName アクションに必要です*

### パラメーター

#### NamePrefix

生成される各デバイス名の先頭に使用される固定プレフィックスです。名前が変更されるすべてのデバイスはこの文字列で始まります。

| プロパティ   | 値             |
| ------- | ------------- |
| 必須      | はい            |
| 既定値     |               |
| 種類      | 文字列           |
| ポータル表示名 | デバイス名のプレフィックス |

#### NameLength

プレフィックスを含む、生成されるデバイス名の総文字数です。ランダムな数字のサフィックスを入れる余地を確保するため、NamePrefix の長さより大きくなければなりません。

| プロパティ   | 値                 |
| ------- | ----------------- |
| 必須      | はい                |
| 既定値     | 0                 |
| 種類      | Int32             |
| ポータル表示名 | 名前の総長（プレフィックスを含む） |

#### OsFilter

重複検出と名前変更の対象として評価するデバイスを制限します。All はすべてのプラットフォームを含みます。Windows と macOS はそれぞれのプラットフォームのみを処理します。Other は Android、iOS、ChromeOS、および認識されない OS を対象とします。既定値は All です。

| プロパティ   | 値        |
| ------- | -------- |
| 必須      | いいえ      |
| 既定値     | すべて      |
| 種類      | 文字列      |
| ポータル表示名 | OS フィルター |

**ポータルのオプション**

| ポータルオプション                 | 値 |
| ------------------------- | - |
| すべてのプラットフォーム              |   |
| Windows のみ                |   |
| macOS のみ                  |   |
| その他（Android、iOS、ChromeOS） |   |

[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/org/devices/dedup-device-names_scheduled.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.
