> 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).

# デバイス名の重複を解消（スケジュール済み）

表示名が重複している Intune デバイスの名前を変更

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

### 説明

同じ表示名を共有する Intune デバイスを見つけ、各セットのうち最も最近登録された 1 台の名前を変更します。生成される名前は固定のプレフィックスに、選択した合計長になるまでランダムな数字を続けたものです。新しい名前は一致する Windows Autopilot レコードにも書き込まれます。OS フィルターにより、どのプラットフォームをチェックするかが制限されます。

### 一般的な使用例

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

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

* `NameLength` は、 `NamePrefix`。その差分によって、追加されるランダムな数字の桁数が決まります。たとえば、 `NamePrefix` 「CORP」に `NameLength` 8 を指定すると、「CORP4271」のような名前になります。
* runbook は起動時にこの制約を検証し、違反している場合は即座に失敗します。

### 動作

によって行われた Autopilot の表示名の変更は `updateDeviceProperties` で、次回のデバイス同期時に反映され、ポータルにすぐには表示されない場合があります。

### 場所

組織 → デバイス → デバイス名の重複排除（スケジュール済み）

**完全な Runbook 名**

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

### 詳細

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

### 権限

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

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

### パラメーター

#### NamePrefix

生成される各名前の先頭に固定で付く部分。たとえば PC-。

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

#### NameLength

プレフィックスを含む生成名の長さ。残りはランダムな数字で埋められるため、プレフィックスより長くなければなりません。

| プロパティ   | 値      |
| ------- | ------ |
| 必須      | true   |
| 既定値     | 0      |
| 種類      | Int32  |
| ポータル表示名 | 名前の合計長 |

#### OsFilter

どのプラットフォームをチェックするか: すべて、Windows のみ、macOS のみ、またはその他 (Android、iOS、ChromeOS)。

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

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

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

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-references/org/devices/dedup-device-names_scheduled.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
