> 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/zhan-kai/onboarding-realmjoin-portal/advanced-setup.md).

# 高度なセットアップ

RealmJoin PowerShell モジュールは、RealmJoin Tenant のセットアップを自動化します。内容は次のとおりです:

* RealmJoin アプリケーション用に必要な Microsoft Entra ID service principals を作成します
* 選択した機能に基づいて、適切な Microsoft Graph のアクセス許可を割り当てます
* RealmJoin の機能（Portal、Intune LAPS、Autopilot、デバイス操作、修復スクリプト、セキュリティ機能）を構成します
* 以前の構成から旧式のアプリケーションをクリーンアップします

このモジュールは次の場所で公開されています: [PowerShell Gallery](https://www.powershellgallery.com/packages/RealmJoin).

## 前提条件

{% hint style="info" %}
必要な Microsoft Graph PowerShell モジュールは、コマンドを初めて実行したときに自動的にインストールされます。
{% endhint %}

* **PowerShell 5.1** 以降
* 次のアカウントでサインインしてください: **Global Administrator** プロンプトが表示されたら、Entra ID Tenant の
* サービス プリンシパルを作成し、アクセス許可を割り当てるには、次の Microsoft Graph のアクセス許可が必要です:
  * `Organization.Read.All`
  * `Application.ReadWrite.All`
  * `AppRoleAssignment.ReadWrite.All`

## 推奨セットアップ

RealmJoin Portal に表示されるセットアップ コマンドでは、次の項目に対するアクセス許可が提供されます:

* コア機能
* Intune LAPS
* サインイン データ
* 修復スクリプト
* Autopilot
* Intune デバイス操作

すべての機能、または個別の機能を追加するには、次を参照してください: [その他のコマンド](#other-commands).

{% stepper %}
{% step %}

#### Windows/Mac で PowerShell を開く

Azure CloudShell ではなく、デバイスの PowerShell 上に RealmJoin PowerShell モジュールをインストールして実行することを推奨します。
{% endstep %}

{% step %}

#### RealmJoin オンボーディング スクリプトをコピーして実行する

スクリプトは、Microsoft Graph での認証を求めます。Global Administrator でサインインしてください。

```powershell
Install-Module -Force -Name RealmJoin
Complete-RJTenantOnboarding -Token 1234ABCD 6>&1
```

{% hint style="info" %}
**概要 `6>&1`:** これらのコマンドは、進行状況の更新を PowerShell の Information ストリームに書き込みます。 `6>&1` そのリダイレクトにより、その出力がコンソールに表示されます。これがないと、実行中の詳細な進行メッセージは表示されません。
{% endhint %}

<figure><img src="/files/e0564eae6fcc895120913859f05500044f0b66cb" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/8996616d4c81d9e27919ccdf118e770ffa76bc3e" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### RealmJoin の使用を開始

完了すると、スクリプトは RealmJoin Portal を起動します

<figure><img src="/files/590870932cb485cdf133c4c81fd62fd901131635" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## その他のコマンド

### 対話型セットアップ

ガイド付きのメニュー形式の体験を行うには:

```powershell
Show-RJInteractiveSetup 6>&1
```

構成を行う前に、利用可能な機能を確認するには:

```powershell
Show-RJFeatureInfo 6>&1
```

### カスタム構成

#### 既定の機能

必須のコア ポータル機能に加えて、既定のオプション機能（RealmJoin Client 以外のすべて）を有効にします:

```powershell
New-RJTenant 6>&1
```

#### 最小機能（必須機能のみ）

```powershell
New-RJTenant -Features @() 6>&1
```

#### すべての機能セット

```powershell
New-RJTenant -All 6>&1
```

#### 読み取り専用アクセス許可

利用可能な場合は読み取り専用アクセス許可を割り当てます（たとえば、 `Group.ReadWrite.All` は `Group.Read.All`):

```powershell
New-RJTenant -ReadOnly 6>&1
```

#### カスタム機能の選択

```powershell
New-RJTenant -Features @('RealmJoinPortal', 'IntuneLAPS', 'Autopilot') 6>&1
```

### 既存の構成の更新

`Update-RJTenant` は、すでに構成済みの Tenant を調整します。エイリアス `Complete-RJTenantOnboarding` は、次と同じように使用できます: `Update-RJTenant`.

#### 新しい機能を追加

```powershell
Update-RJTenant -AddFeatures @('SecurityFeatures') 6>&1
```

#### 機能を削除

```powershell
Update-RJTenant -RemoveFeatures @('ShowSignin') 6>&1
```

#### 読み取り専用アクセス許可に切り替える

```powershell
Update-RJTenant -ReadOnly 6>&1
```

#### 変更をプレビュー

```powershell
Update-RJTenant -AddFeatures @('SecurityFeatures') -WhatIf 6>&1
```

## 利用可能な機能

これらの機能名を次のパラメーターと一緒に使用してください: `-Features`, `-AddFeatures`、および `-RemoveFeatures` 。必須機能は常に有効です。既定の構成（`New-RJTenant` パラメーターなし）では、次を除くすべての機能が有効になります: **Client**.

| 機能                    | 説明                                        | 既定値 |
| --------------------- | ----------------------------------------- | :-: |
| `RealmJoinPortal`     | ユーザーのセルフサービスと管理者とのやり取りのためのコア ポータル機能（必須）   |  ☑️ |
| `IntuneLAPS`          | Intune LAPS を介してローカル管理者パスワードを取得および管理します   |  ☑️ |
| `ShowSignin`          | ユーザーのサインイン履歴と監査ログを表示します                   |  ☑️ |
| `Autopilot`           | Windows Autopilot の展開プロファイルと状態を表示します      |  ☑️ |
| `DeviceIntuneActions` | 特権デバイス操作（同期、再起動、ワイプなど）を実行します              |  ☑️ |
| `DeviceHealthScript`  | PowerShell 修復スクリプトをデバイスに管理および展開します        |  ☑️ |
| `SecurityFeatures`    | 高度な脅威保護とセキュリティ分析（MDE ライセンスが必要）            |     |
| `Client`              | RealmJoin Agent — デバイス管理用のクライアント アプリケーション |     |

## トラブルシューティング

{% hint style="warning" %}
**「権限が不十分です」** — サインインに使用するアカウントが Global Administrator であり、次の項目の下に一覧表示されている Microsoft Graph のアクセス許可に同意できることを確認してください。 [前提条件](#prerequisites).
{% endhint %}

モジュールが見つからない場合は、PowerShell Gallery が利用可能であることを確認し、再インストールしてください:

```powershell
Get-PSRepository 6>&1
Install-Module -Name RealmJoin -Force 6>&1
```

### ヘルプの参照

```powershell
Get-Help New-RJTenant -Full
Get-Help Update-RJTenant -Examples
Get-Help Show-RJInteractiveSetup -Detailed
```


---

# 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/zhan-kai/onboarding-realmjoin-portal/advanced-setup.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.
