> For the complete documentation index, see [llms.txt](https://docs.parallels.com/landing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallels.com/landing/ras-admin-guide/v22-ja-jp/rd-sesshonhosuto/roguonno.md).

# ログオンの管理

ログオン管理機能を使用すると、リモート デスクトップ セッション ホストからのログオンを有効または無効にすることができます。この機能は、コマンド`change logon`ライン ユーティリティと同じ処理を実行します。

{% hint style="warning" %}
**注意**：自動スケーリングがオンになっている場合、手動での操作によってオートスケーラーが予期せず動作を開始する可能性があるため、以下の制御オプションは利用できません。
{% endhint %}

{% hint style="info" %}
**注:** テンプレートに基づくリモート デスクトップ セッション ホストの場合、ドレイン モード（ログオンをオフにするモード）は、ホストが属するグループによって自動的に処理されます。その他については、「[**Microsoft Azure Scheduler の使用」**](/landing/ras-admin-guide/v22-ja-jp/rd-sesshonhosuto/rd-sesshonhosutono/using-scheduler-rd-session-hosts.md)を参照してください。
{% endhint %}

ログインを管理するには：

1. Parallels RAS コンソールで、\[**Farm**] > \<SITE> > \[**リモート デスクトップ セッション ホスト]** の順に選択します。
2. リモート デスクトップ セッション ホストを選択し、\[**タスク]** > **\[コントロール]** をクリックして\*\*、\*\*次のいずれかを選択します。
   * **ログインをオンにする**：クライアント コンピューターからのログインをオンにしますが、コンソールからのログインはオンにしません。このオプションは、コマンド`change logon /enable`と同じ動作を行います。
   * **ログオンを無効にする**：クライアント コンピューター セッションからの以降のログオンを無効にしますが、コンソールからのログオンは対象外です。現在ログオンしているユーザーには影響しません。このオプションは、コマンド`change logon /disable`と同じ動作を行います。
   * **ドレイン**：新しいクライアント コンピューターからのログインをオフにしますが、既存の共有セッションへの再接続は許可されます。ドレインは、コンピューターの管理者がログインをオンにするまで、再起動後も維持されます。

     なお、ホストがドレインモードにある間も、管理者は物理コンソールにログインしたり、MSTSCのコマンドラインオプション「/admin」または「/console」を使用してリモートでログインしたりすることができます。これにより、管理者は **\[ツール]** > \[**Microsoft リモート デスクトップ**] を通じて、RDSホストをリモートで保守することが可能になります\*\*。\*\*
   * **再起動まで接続を遮断**：コンピュータが再起動されるまで、新しいクライアント コンピューターセッションからのログオンをオフにしますが、既存のセッションへの再接続は許可されます。この制限は、ホストが再起動されるまで維持されます。この動作は コマンド`change logon /drainuntilrestart`と同じです。

リモート デスクトップ セッション ホストの現在のログオン制御モードを確認するには、**\[タスク]** > **\[制御]** をクリックします。「チェックアウト済み」というオプションは、選択したリモート デスクトップ セッション ホストの現在のログオン制御モードを示しています。コマンド ラインからこの確認を行うには、ホスト上で コマンド`change logon /QUERY`を実行します。

また、以下の点にもご留意ください：

* ホストにログオン制御モードを適用する際は、エージェントのステータスがそれに応じて更新されていることを確認してください。
* ホストごとのログオン制御オプションは、1台ずつ設定する必要があります。ホストのグループに対して設定を行う必要がある場合は、Microsoft Azure Schedulerを使用できます（[**「Microsoft Azure Schedulerの使用」**](/landing/ras-admin-guide/v22-ja-jp/rd-sesshonhosuto/rd-sesshonhosutono/using-scheduler-rd-session-hosts.md)を参照）。
* `/Drain` 新しいクライアントセッションからのログオンを無効にしますが、既存のセッションへの再接続は許可します。Drainは、管理者の介入が必要であるという点`Drainuntilrestart`で後者とは異なります。一方、後者は再起動後に自動的にログオンを有効にします。
* **\[コンピューターの構成] → \[管理用テンプレート] → \[Windows コンポーネント] → \[リモートデスクトップサービス] → \[リモートデスクトップセッションホスト] → \[接続] → \[ユーザーがリモートデスクトップサービスを使用してリモート接続できるようにする]** は\*\*、「未構成」\*\*に設定する必要があります。そうしないと、この設定が優先されてしまいます。


---

# 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.parallels.com/landing/ras-admin-guide/v22-ja-jp/rd-sesshonhosuto/roguonno.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.
