Skip to content

Commit afd661b

Browse files
committed
prerequisites
1 parent 4e53c49 commit afd661b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

articles/virtual-desktop/drain-mode.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ ms.author: helohr
1414

1515
Drain mode isolates a session host when you want to apply patches and do maintenance without disrupting user sessions. When isolated, the session host won't accept new user sessions. Any new connections will be redirected to the next available session host. Existing connections in the session host will keep working until the user signs out or the administrator ends the session. When the session host is in drain mode, admins can also remotely connect to the server without going through the Azure Virtual Desktop service. You can apply this setting to both pooled and personal desktops.
1616

17+
## Prerequisites
18+
19+
If you're using either the Azure portal or PowerShell method, you'll need the following things:
20+
21+
- A host pool with at least one session host.
22+
- An Azure account assigned the [Desktop Virtualization Session Host Operator](rbac.md#desktop-virtualization-session-host-operator) role.
23+
- If you want to use Azure PowerShell locally, see [Use Azure CLI and Azure PowerShell with Azure Virtual Desktop](cli-powershell.md) to make sure you have the the [Az.DesktopVirtualization](/powershell/module/az.desktopvirtualization) PowerShell module installed. Alternatively, use the [Azure Cloud Shell](../cloud-shell/overview.md).
24+
25+
If you're enabling drain mode with PowerShell, you'll need to [download and install the Azure Virtual Desktop PowerShell module](powershell-module.md) if you haven't already.
26+
1727
## Enable drain mode
1828

1929
Here's how to enable drain mode using the Azure portal and PowerShell.
@@ -34,7 +44,9 @@ To turn on drain mode in the Azure portal:
3444

3545
You can set drain mode in PowerShell with the *AllowNewSessions* parameter, which is part of the [Update-AzWvdSessionhost](/powershell/module/az.desktopvirtualization/update-azwvdsessionhost) command.
3646

37-
Run this cmdlet to enable drain mode:
47+
[!INCLUDE [include-cloud-shell-local-powershell](includes/include-cloud-shell-local-powershell.md)]
48+
49+
2. Run this cmdlet to enable drain mode:
3850

3951
```powershell
4052
$params = @{
@@ -47,7 +59,7 @@ $params = @{
4759
Update-AzWvdSessionHost @params
4860
```
4961

50-
Run this cmdlet to disable drain mode:
62+
3. Run this cmdlet to disable drain mode:
5163

5264
```powershell
5365
$params = @{

0 commit comments

Comments
 (0)