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

# Runbooks

環境の日常業務を自動化します。

{% embed url="<https://www.youtube.com/watch?v=TfL7xRasVUg>" %}

RealmJoin は管理者が次を使用してタスクを自動化できるようにします [Azure Automation](https://learn.microsoft.com/en-us/azure/automation/overview) を実行するために [PowerShell Runbook](https://docs.microsoft.com/en-us/azure/automation/automation-runbook-types#powershell-runbooks).

Runbook は、通常はサポート エンジニア / オペレーターや管理者が実行しなければならないタスクを自動化するスクリプトです。これらのタスクを自動化することで、手作業によるミスのリスクを低減し、操作の監査性を向上させます。

RealmJoin が自動化の支援に役立つ一般的なタスクには、次のようなものがあります:

* ユーザー ライフサイクル操作（ユーザーのオンボーディング／オフボーディング）
* 一時的なアクセス パス（TAP）の作成
* M/O365 ライセンス使用状況のレポート
* メール エイリアスの管理

RealmJoin Portal をサポート チームや管理チームに提供することで、日々の運用を簡素化し、品質を向上させることができます。

![](https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FMc2l3m04STPICTYA1oRR%2Fuser%20rb.png?alt=media\&token=9caed6bc-dee4-41b1-b937-b422cdf5022f)

### PowerShell ランタイム環境への移行

RealmJoin は現在、Windows PowerShell v5.1 から PowerShell v7.4 への移行を進めています [ランタイム環境](https://learn.microsoft.com/en-us/azure/automation/manage-runtime-environment).

{% hint style="info" %}
Automation Account で「ランタイム環境」エクスペリエンスが有効になっていることを確認してください。
{% endhint %}

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2F6zw45i9VYQdWogZMGM3T%2Fre.png?alt=media&amp;token=6d5b6db5-e8d4-49dd-9682-bcad7300b98e" alt=""><figcaption></figcaption></figure>

次を実行すると [同期](#syncing-from-the-shared-repository)を実行すると、カスタム PowerShell ランタイム環境「RJ-PowerShell-7.4」が作成され、同期された Runbook はこの環境に移動されます。必要に応じて、必要な PowerShell モジュールが自動的にインポートされます。

{% hint style="info" %}
のため、 **処理時間が変動する** ことで 404 などのエラーが発生する可能性があるため、 **もう一度同期してください**。また、移行後に最初の Runbook を開始する前に数分待ってください。
{% endhint %}

{% hint style="warning" %}
**カスタム / 非同期 Runbook は自動的にはアップグレードされません。**

Azure Portal を使用し、これらの Runbook で「ポータルで編集」を使って手動で移行できます。変更を有効にするには、Runbook を「公開」することを忘れないでください。
{% endhint %}

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FG8FrcvNoMJWIrHJQm0hk%2Fimage.png?alt=media&amp;token=33d5dee3-2d63-42b8-b1b4-9ad85d20aacb" alt=""><figcaption></figcaption></figure>

## 一般的な Runbook

RealmJoin は [runbook の共有オンライン リポジトリ](https://github.com/realmjoin/realmjoin-runbooks)。これらは、多くの環境に共通するさまざまな一般的な操作をカバーすることを目的としています。Runbook は継続的に更新・改善されています。もちろん、独自のカスタム Runbook も追加できます。

RealmJoin Portal では、これらの Runbook を次を通じてインポートできます [RealmJoin Runbook Management App](https://docs.realmjoin.com/ja/zi-dong-hua/connecting-azure-automation/required-permissions.md#b31d828b-8bcb-45fc-8d72-5418777a5376) を環境に導入し、サポートおよび管理スタッフに、Runbook が扱うタスクのための簡単で非技術的なインターフェースを提供します。

### 共有リポジトリからの同期

以下で「上流と Runbook を同期」をクリックすると、共有リポジトリから Azure Automation アカウントへの同期を開始できます

<https://portal.realmjoin.com/settings/general>

![Runbook の同期を開始する](https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2F0KIq5zPxTcdqcZFKKRMu%2Fimage.png?alt=media\&token=18499a55-69c7-4235-8da1-da79441660f9)

「同期完了」メッセージを待ってください。同期処理の実行中はブラウザー ウィンドウを開いたままにしてください。

の説明にあるように [命名規則](https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/naming-conventions.md) これにより、接続されている Azure Automation アカウントに対して Runbook の追加、更新、必要に応じた削除が行われ、RealmJoin の共有リポジトリと同期されます。これにより、改善、修正、新機能を含めて Runbook を最新の状態に保てます。

## カスタマイズ

既存および新規の Runbook を環境に合わせてカスタマイズできます。たとえば、次のようなことができます。

* オフィスの場所など、共通情報のテンプレートを使用する
* オフボーディング時にユーザー オブジェクトの削除を許可しないようにするなど、パラメーターを事前入力／事前設定する
* 特定の入力／パラメーターを非表示にする

参照 [Runbook のカスタマイズ ](https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-customization.md)詳細については。

## スコープ

RealmJoin Portal の Runbook は、環境内のさまざまな種類のオブジェクトに応じてスコープが設定されています。一部の Runbook は、ライセンス レポートの作成のように、Tenant / 組織レベルで動作します。別の Runbook は、パスワードのリセットのように、ユーザーごとにスコープが設定されています。RealmJoin Portal はこのスコープ設定を使用して、適切なコンテキストで適切な Runbook を提供します。

参照 [命名規則](https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/naming-conventions.md) Runbook が環境内の特定のオブジェクトにどのようにスコープ設定されているかについて学習します。

## アクセス制御

特定の Runbook を使用するためのアクセス／権限は、Runbook レベルできめ細かく設定できます。たとえば、Runbook の権限を使用すると、次のようなことができます。

* この Runbook へのアクセスを 3 次レベルのオペレーターのみに許可する
* VIP サポート チームだけに CEO のメール アドレスの変更を許可する

参照 [Runbook の権限](https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-permissions.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.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.
