> 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/apuri/avd-templates.md).

# AVD テンプレート

## 概要

この機能を使用すると、アプリケーションのセット（いわゆるテンプレート）を定義できます。このアプリケーションセットは、その後、RealmJoin Client を使用して、ヘッドレス / 無人の方法でコンピューターに適用できます。

これは、Azure Virtual Desktop のマルチセッション プールホスト用のゴールデンイメージを作成するためのものです。

{% hint style="info" %}
Azure Virtual Desktop (AVD) テンプレートの作成と管理は、高度な知識、綿密な計画、正確な設定を必要とする複雑な作業です。このページで説明している RealmJoin 関連のトピックについては全面的にサポートしますが、より広範な AVD テンプレート作成のトピックについては支援できる範囲が限られています。これには、AVD テンプレートの作成、カスタマイズ、展開、トラブルシューティングに関する一般的なガイダンスが含まれますが、これに限りません。
{% endhint %}

## 権限

この機能を有効にするには、次を定義する必要があります [カスタム ロール](/ja/realmjoin-she-ding/permission/custom-roles.md) そして、そのロールをグループまたはユーザーに割り当てます。

次の定義をコピーし、GroupID を適切に変更してください。

```json
{
  "Rules": [
    {
      "Name": "管理者がテンプレート作成機能にアクセスできるようにする",
      "Groups": [
        "<管理者グループの Group ID>"
      ],
      "Permissions": [
        "CanReadTemplateTable",
        "CanReadTemplateDetails",
        "CanEditTemplate",
        "CanDeleteTemplate",
        "CanChangeTemplatePackages",
        "CanChangeTemplateTokens"
      ]
    }
  ]
}
```

## テンプレートの管理

### テンプレートの作成

1. "templates" アイコンをクリックするか、次の url を入力して Templates セクションを開きます: <https://portal.realmjoin.com/templates>

<figure><img src="/files/23e4b948dcdd38194e552b14cad322ac9366fb8c" alt=""><figcaption><p>テンプレート一覧</p></figcaption></figure>

2. 選択し、 <img src="/files/ea28e12fb496c33be514cfb93f7bdb2fc78cf77f" alt="" data-size="line"> アイコン (1) をクリックし、意味のある名前 (2) を入力して、「Save」をクリックします (3)。

<figure><img src="/files/527f2ac1ad2d7a060e7ee3d8fdc6dda924455fd5" alt=""><figcaption><p>テンプレートを作成する</p></figcaption></figure>

### テンプレートにアプリケーションを追加

1. その名前をクリックしてテンプレートを開きます。
2. テンプレートにパッケージを追加するには、次の <img src="/files/ea28e12fb496c33be514cfb93f7bdb2fc78cf77f" alt="" data-size="line"> アイコンをクリックします。

<figure><img src="/files/6df675ef13f842b0d239c33e31b4f26a781fa52e" alt=""><figcaption><p>テンプレートにパッケージを追加 - 1</p></figcaption></figure>

3. パッケージを検索し、次の ![](/files/ecd7691d721f23e66ec40811e430abaf6a3bfa6b) アイコンを押して、テンプレートに追加します。この一覧には、あなたの環境でサブスクライブしているすべての RealmJoin パッケージが表示されます。
4. 完了したら、次の **閉じる** ボタンをクリックします。

<figure><img src="/files/06288b7621b095002278fb0eec6c6c4cd76f386e" alt=""><figcaption><p>テンプレートにパッケージを追加 - 2</p></figcaption></figure>

{% hint style="info" %}
Intune パッケージは AVD テンプレートを使用して割り当てることはできません。
{% endhint %}

### テンプレートからアプリケーションを削除

1. その名前をクリックしてテンプレートを開きます。
2. アプリケーションを削除したい場合は、 **割り当て解除**。パッケージ レベルで設定された引数を上書きする引数を定義したい場合は、次をクリックして行えます **設定**.

<figure><img src="/files/d9bec83b8a41a4b9441d47d6b418c3a84af57bc6" alt=""><figcaption><p>テンプレートからパッケージを削除</p></figcaption></figure>

### トークンを作成

RealmJoin Client を使用してテンプレートを利用するには、トークンも必要です。

{% hint style="warning" %}
トークンは慎重に扱ってください。トークンが漏えいした可能性があると思われる場合は、次の **失効** ボタンをトークンの横でクリックして失効させてください。
{% endhint %}

1. トークンを作成するには、次の **トークン** タブをクリックします。
2. 次の <img src="/files/ea28e12fb496c33be514cfb93f7bdb2fc78cf77f" alt="" data-size="line"> アイコン (1) をクリックし、意味のある名前 (2) を入力して、 **保存** (3).

<figure><img src="/files/dbe89f9221550648affd699d9425713de01f37d2" alt=""><figcaption><p>トークンを作成</p></figcaption></figure>

## テンプレートを使用する

### AVD / ヘッドレス プロビジョニング

展開に使用するテンプレート ID とトークンを用意します。

<figure><img src="/files/2d4fcb82cbcb3e680fc76c5b8f946c7ced1d476b" alt=""><figcaption><p>テンプレート ID とトークンを確認</p></figcaption></figure>

ゴールデンイメージとして準備したいシステム/VM 内で、次のコマンドを実行します:

1. RealmJoin をダウンロード: `Invoke-WebRequest -Uri "https://gkrealmjoin.s3.amazonaws.com/win-release/RealmJoin.exe" -OutFile "C:\temp\RealmJoin.exe"`
2. RealmJoin をインストール: `Start-Process -FilePath "C:\temp\RealmJoin.exe" -ArgumentList "-install" -Wait`
3. ヘッドレス展開を実行します。個別のテンプレート ID とトークンを必ず入力してください: `Start-Process -FilePath "C:\Program Files\RealmJoin\RealmJoinService.exe" -ArgumentList " -avdprovision <Template ID> <Template Token>"`

### ロギングとトレース

RealmJoin のインストールとヘッドレス展開の両方で、追加の引数 `-trace` を追加してロギングを拡張できます。ヘッドレス展開中の状態/ログを確認するには、realmjoin.log を開いて定期的に更新してください。これは次の場所で見つかります `C:\Windows\Logs\`


---

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

```
GET https://docs.realmjoin.com/ja/apuri/avd-templates.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.
