Skip to content

Commit 532bff5

Browse files
Update drain-mode.md
1 parent d1c0e50 commit 532bff5

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

articles/virtual-desktop/drain-mode.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Drain session hosts for maintenance in Azure Virtual Desktop
3-
description: Learn how to drain session hosts for maintenance in Azure Virtual Desktop.
3+
description: Learn how to enable drain mode to isolate session hosts for maintenance in Azure Virtual Desktop.
44
ms.topic: how-to
55
author: dknappettmsft
66
ms.author: daknappe
7-
ms.date: 02/22/2024
7+
ms.date: 02/23/2024
88
---
99

1010
# Drain session hosts for maintenance in Azure Virtual Desktop
@@ -45,37 +45,37 @@ To enable drain mode for a session host and block new sessions in the Azure port
4545

4646
### [Azure PowerShell](#tab/powershell)
4747

48-
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.
48+
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. You'll need to run these commands for every session host for which you want to enable and disable drain.
49+
50+
> [!IMPORTANT]
51+
> In the following examples, you'll need to change the `<placeholder>` values for your own.
4952
5053
[!INCLUDE [include-cloud-shell-local-powershell](includes/include-cloud-shell-local-powershell.md)]
5154

5255
2. To enable drain for a session host and block new sessions, run the following command:
5356

5457
```powershell
5558
$params = @{
56-
ResourceGroupName = '<resourceGroupName>'
57-
HostPoolName = '<hostpoolname>'
58-
Name = '<hostname>'
59+
ResourceGroupName = '<ResourceGroupName>'
60+
HostPoolName = '<HostPoolName>'
61+
Name = '<SessionHostName>'
5962
AllowNewSession = $False
6063
}
6164
6265
Update-AzWvdSessionHost @params
6366
```
6467

65-
3. To disable drain for a session host and allow new sessions, run the following command:
68+
3. To disable drain for a session host and allow new sessions, run the following command:
6669

6770
```powershell
6871
$params = @{
69-
ResourceGroupName = '<resourceGroupName>'
70-
HostPoolName = '<hostpoolname>'
71-
Name = '<hostname>'
72+
ResourceGroupName = '<ResourceGroupName>'
73+
HostPoolName = '<HostPoolName>'
74+
Name = '<SessionHostName>'
7275
AllowNewSession = $True
7376
}
7477
7578
Update-AzWvdSessionHost @params
7679
```
7780

78-
> [!IMPORTANT]
79-
> You'll need to run these commands for every session host for which you want to enable and disable drain.
80-
8181
---

0 commit comments

Comments
 (0)