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
- Notify users and confirm the maintenance window.
- Place the selected host in drain mode.
- Review existing sessions and contact remaining users.
- Perform maintenance after sessions end.
- Validate health and enable logons again.
Commands
change logon /drain
quser
Get-RDUserSession | Sort-Object HostServer,UserName
change logon /enableVerification
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.