Skip to content

How to Drain an RDS Session Host for Maintenance Print

  • 0

Applies to: Windows Server 2019, Windows Server 2022, and Windows Server 2025.

Drain mode blocks new logons to one RDS Session Host while allowing current users to complete work before maintenance.

Prerequisites

  • Administrative access and an approved change window.
  • A verified backup and documented rollback plan.
  • A pilot environment or low-risk target for validation.

Step-by-step procedure

  1. Notify users and confirm the maintenance window.
  2. Place the selected host in drain mode.
  3. Review existing sessions and contact remaining users.
  4. Perform maintenance after sessions end.
  5. Validate health and enable logons again.

Commands

change logon /drain
quser
Get-RDUserSession | Sort-Object HostServer,UserName
change logon /enable

Verification

New sessions are directed elsewhere and the maintained host accepts connections after it is re-enabled.

Rollback

Run change logon /enable immediately if capacity or brokering is affected, then validate host health.

Security notes

  • Use least privilege and record the change.
  • Review relevant event logs after implementation.
  • Test before production rollout.

Related resources

Canadian Windows VPS and RDS hosting: networkmanager.info. Refer to Microsoft Windows Server documentation.


Was this answer helpful?

« Back