> 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/de/automatisierung/runbooks/runbook-references/device/avd/toggle-drain-mode.md).

# Drain-Modus umschalten

Den Drain-Modus auf diesem AVD-Session-Host aktivieren oder deaktivieren

### Beschreibung

Schaltet den Drain-Modus für diesen Azure Virtual Desktop-Session-Host um, unabhängig davon, zu welchem Hostpool des Mandanten er gehört. Ist der Drain-Modus aktiviert, nimmt der Host keine neuen Sitzungen an, zum Beispiel vor Wartungsarbeiten; bestehende Sitzungen bleiben verbunden. Ist der Drain-Modus deaktiviert, nimmt der Host wieder neue Sitzungen an.

### Speicherort

Gerät → AVD → Drain-Modus umschalten

**Voller Runbook-Name**

rjgit-device\_AVD\_toggle-drain-mode

### Details

| Eigenschaft          | Wert                                                                                                        |
| -------------------- | ----------------------------------------------------------------------------------------------------------- |
| Version              | 1.0.1                                                                                                       |
| Erforderliche Module | <p>RealmJoin.RunbookHelper (>= 0.8.10)<br>Az.DesktopVirtualization (>= 6.0.0)<br>Az.Accounts (>= 5.5.2)</p> |
| Planbar              | nein                                                                                                        |

### Berechtigungen

#### Hinweise zu Berechtigungen

Azure: Mitwirkender für Desktop Virtualization Host Pool im Abonnement, das den Hostpool enthält

### Parameter

#### Gerätename

Name des AVD-Session-Hosts. Wird vom Portal aus dem ausgewählten Gerät gesetzt.

| Eigenschaft            | Wert                                            |
| ---------------------- | ----------------------------------------------- |
| Erforderlich           | wahr                                            |
| Standardwert           |                                                 |
| Typ                    | Zeichenfolge                                    |
| Im Portal ausgeblendet | ja (vorkonfiguriert über die Runbook-Anpassung) |

#### Drain-Modus

Ob der Host keine neuen Sitzungen mehr annehmen soll (Drain-Modus aktiviert) oder wieder neue Sitzungen annehmen soll (Drain-Modus deaktiviert).

| Eigenschaft           | Wert        |
| --------------------- | ----------- |
| Erforderlich          | wahr        |
| Standardwert          | Falsch      |
| Typ                   | Boolesch    |
| Anzeigename im Portal | Drain-Modus |

**Portaloptionen**

| Portaloption                              | Wert   |
| ----------------------------------------- | ------ |
| Ein - keine neuen Sitzungen mehr annehmen | wahr   |
| Aus - wieder neue Sitzungen annehmen      | falsch |

#### Abonnement-IDs

Azure-Abonnements, die die AVD-Hostpools enthalten. Übernommen aus der Mandanten-Einstellung AVD.SubscriptionIds.

| Eigenschaft            | Wert                                            |
| ---------------------- | ----------------------------------------------- |
| Erforderlich           | wahr                                            |
| Standardwert           |                                                 |
| Typ                    | String\[]                                       |
| Im Portal ausgeblendet | ja (vorkonfiguriert über die Runbook-Anpassung) |

[Zurück zur Übersicht der Runbook-Referenz](/de/automatisierung/runbooks/runbook-references.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/de/automatisierung/runbooks/runbook-references/device/avd/toggle-drain-mode.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.
