# エージェントのデプロイ

RealmJoin Agent は Microsoft Intune を使用してシームレスに展開できます。すぐに使えるパッケージが Package Store に用意されており、セットアップ手順を簡素化できます。\
このガイドでは、Intune 経由で RealmJoin Agent をインストールするための推奨およびサポートされている方法を説明します。

## 自動展開

### Microsoft Intune (intunewin)

{% hint style="success" %}
推奨
{% endhint %}

RealmJoin は、エージェントを intunewin パッケージとして追加および更新することで、Microsoft Intune テナントと直接連携します:

1. 当社の **パッケージストア**.
2. バナー「RealmJoin Agent」を選択するか、この直接リンクを使用してください: [RealmJoin Agent (Device)](https://portal.realmjoin.com/packagestore/45935/overview)<br>

   <figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FfeIw2aeCYivyheibRk7N%2Fimage.png?alt=media&#x26;token=8a94847c-a5e6-4ba6-80cf-9256506ae53d" alt=""><figcaption></figcaption></figure>
3. 展開方法として「**Use Intune (managed)**」を選択し、「Continue」をクリックします。
4. このパッケージを「**Enrollment Status Page**」の「Block device use until required apps are installed if they are assigned to the user/device」に追加してください。これにより、Intune は enrollment 中に RealmJoin Agent のインストールを待機します。
5. また、「**Automation Main channel**".

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FYo2RBeON8S2CiF5Eh7cq%2Fimage.png?alt=media&#x26;token=05cd015a-384b-44a4-8ab8-132646de8598" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
RealmJoin agent will **新しいバージョンを確認** の間に **初期展開** および **必要に応じて更新します**。この処理を速めるために、引き続き「Automate Main channel」を推奨します。これにより、最初から最新バージョンがインストールされます。
{% endhint %}

{% hint style="warning" %}
お願いですので **「Automate Preview channel」は使用しないでください** 、なぜなら **intunewin アプリケーション ID が変更される可能性があるため** 、その結果「Enrollment Status Page」構成からパッケージが削除されます。
{% endhint %}

6. **パッケージを** に割り当ててください **デバイス** （ユーザー オブジェクトに割り当てると、展開中にエージェントが起動しない場合があります）、例:
   1. 追加 **単一のデバイスまたはデバイス グループ** 自動的に作成される管理対象アプリ グループに
   2. 「**All devices**」を **Intune 経由の追加の割り当てとして追加する** （AVD や Kiosk などの特別なデバイスを除外するためにフィルターが必要になる場合があります）

{% hint style="info" %}
当社のストアでは、ユーザー レベルで動作する「RealmJoin Agent (User)」パッケージも提供しています（以前の既定値でした）。 **安定性の理由から**、現在は **デバイス レベル版のみを推奨しています**.
{% endhint %}

## Beta および Canary チャネル

{% hint style="info" %}
RealmJoin のリリース **チャネル** は **ユーザーおよびグループ設定で調整できます**: [RealmJoin release channel を構成する](https://docs.realmjoin.com/ja/ugd-management/user-and-group-settings)。 **初期展開時のみ**、 **チャネルはインストーラー パッケージによって定義され、固定されます。** を使用する場合 [自動展開](#automatic-deployment) 当社の Package store では、展開は常に release channel を使用します。
{% endhint %}

〜の場合 **他のチャネルで初期展開をテストする場合**、次のいずれかの intunewin パッケージを手動でダウンロードしてアップロードできます:

* Beta Channel (安定版に近く、長期テスト向け):\
  [RealmJoin Beta Version](https://gkrealmjoin.s3.amazonaws.com/win-beta/RealmJoinSystemInstallEspDeviceSetupOnly.intunewin)
* Canary Channel (実験的、最初のテスト用):\
  [RealmJoin Canary Version](https://gkrealmjoin.s3.amazonaws.com/win-canary/RealmJoinSystemInstallEspDeviceSetupOnly.intunewin)

Intune にアップロードする際は、推奨設定を使用し、以下を設定してください:

* Program:
  * Device restart behavior: `Determine behavior based on return codes`
* Detection rules:
  * Manually configure detection rules
  * File:
    * Path: `C:\Program Files\RealmJoin`
    * File or folder: `RealmJoin.exe`
    * Detection method: `File or folder exists`
    * Associated with a 32-bit app on 64-bit clients: `なし`

## Windows Defender 例外

RealmJoin は Microsoft Defender チームと連携し、マルウェア検出のホワイトリストに登録されています。Defender は潜在的な脅威を識別するために機械学習の仕組みをますます多く使用しており、RealmJoin にはクラウドからダウンロードするアプリケーションのインストールなどの機能がいくつかあるため、RealmJoin は **Windows Defender** によって潜在的な脅威として認識される場合があります。

この動作が確実というわけではありませんが、追加の **Windows Defender Antivirus 例外**:

| Defender 例外                                     |
| ----------------------------------------------- |
| **Files and Folders**                           |
| `%ProgramFiles%\RealmJoin`                      |
| `%ProgramFiles%\RealmJoin\RealmJoin.exe`        |
| `%ProgramFiles%\RealmJoin\RealmJoinService.exe` |
| `%ProgramFiles%\RealmJoin\RealmJoinUpdate.exe`  |
| **Processes**                                   |
| `%ProgramFiles%\RealmJoin`                      |
| `%ProgramFiles%\RealmJoin\RealmJoin.exe`        |
| `%ProgramFiles%\RealmJoin\RealmJoinService.exe` |
| `%ProgramFiles%\RealmJoin\RealmJoinUpdate.exe`  |

{% hint style="info" %}
同じパスを **Files and Folders** および **Processes**で構成することが重要です。場合によっては、Microsoft はこれらの Defender 例外のうち 1 つしか確認しません。
{% endhint %}

## 追加情報

### 自動展開

#### Legacy: Microsoft Intune (MSI)

{% hint style="warning" %}
この **レガシー展開方法** は参照目的でのみ提供されており、 **現在はサポートされていません**.

また、 [Microsoft は MSI と intunewin の展開を混在させることを推奨していません](https://learn.microsoft.com/en-us/intune/intune-service/apps/lob-apps-windows)：「Windows Autopilot の enrollment 中に Win32 アプリと line-of-business アプリのインストールを混在させると、両方が同時に Trusted Installer サービスを使用するため、アプリのインストールが失敗する可能性があります。」
{% endhint %}

RealmJoin は [MSI インストーラー](#msi-installer) を Line-of-Business アプリとして展開できます。Intune にアップロードする際は、「Ignore app version」を「Yes」に設定してください。

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FrShHt2tT5AvEUqx4gikB%2Fimage.png?alt=media&#x26;token=ed311281-dd1b-4d42-bb9f-5cb13edee9e5" alt="" width="364"><figcaption></figcaption></figure>

### コマンドラインによる対話型インストール

管理者が、 массов展開や Microsoft Intune インフラストラクチャを使用せずにデバイスへ RealmJoin Agent をインストールしたい場合、MSI をダウンロードして対話型インストールを実行できます。代替として、以下のコマンドラインのいずれかをコピーして、1 ステップで Agent をダウンロードして実行することもできます。

#### MSI インストーラーと EXE

* 安定版リリース:\
  [MSI](https://gkrealmjoin.s3.amazonaws.com/win-release/RealmJoin.msi) または [EXE](https://gkrealmjoin.s3.amazonaws.com/win-release/RealmJoin.exe)
* Beta Channel (安定版に近く、長期テスト向け):\
  [MSI](https://gkrealmjoin.s3.amazonaws.com/win-beta/RealmJoin.msi) または [EXE](https://gkrealmjoin.s3.amazonaws.com/win-beta/RealmJoin.exe)
* Canary Channel (実験的、最初のテスト用):\
  [MSI](https://gkrealmjoin.s3.amazonaws.com/win-canary/RealmJoin.msi) または [EXE](https://gkrealmjoin.s3.amazonaws.com/win-canary/RealmJoin.exe)

#### Release Channel

```
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "((new-object net.webclient).DownloadFile('https://gkrealmjoin.s3.amazonaws.com/win-release/RealmJoin.exe', 'realmjoin.exe'))" && .\realmjoin.exe
```

#### Beta チャネル

```
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "((new-object net.webclient).DownloadFile('https://gkrealmjoin.s3.amazonaws.com/win-beta/RealmJoin.exe', 'realmjoin.exe'))" && .\realmjoin.exe
```

#### Canary チャネル

```
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "((new-object net.webclient).DownloadFile('https://gkrealmjoin.s3.amazonaws.com/win-canary/RealmJoin.exe', 'realmjoin.exe'))" && .\realmjoin.exe
```

### サイレント インストール

無人 OS インストールやその他の非対話型展開方法で RealmJoin をインストールする場合、インストール中に UI 操作を行わないことを選択できます。このようなシナリオで RealmJoin をインストールするには、サイレント インストール オプションを使用してください:

```
reamjoin.exe -install
```

### 署名済み MSI

RealmJoin.MSI は RealmJoin によって SHA2 (256 bit) 署名されているため、Windows から安全にインストールできるものとして認識されます。

![](https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FLgoUYkRJF8acq3qRvNfj%2Frealmjoin.msi.signature.png?alt=media\&token=b33acfc4-8f6f-4813-adeb-ac6c5c2e59cc)
