You can set the RDS host in the drain mode state or in the drain mode until restart state. When you set the RDS host in drain mode state, the RDS host can no longer accept new connections but existing sessions continue working until users log out. When you set the RDS host in the drain until restart state, the RDS host is in the drain mode state until it restarts.

When you use change logon commands or registry key entries to change the state of the RDS host, Horizon Agent communicates the status of the RDS host to Connection Server. You can monitor the status of the RDS host in Horizon Administrator. For more information on the status of RDS hosts, see Status of RDS Hosts.

The registry keys are located in the following paths:

  • HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\WinStationsDisabled
  • HKLM\System\CurrentControlSet\Control\Terminal Server\TSServerDrainMode
Enabled

To set the RDS host in the enabled state, use the change logon /enable command or set the registry keys WinStationsDisabled = 0 and TSServerDrainMode = 0.

Connection Server has the following behavior for the RDS host in the enabled state:

  • Allows new connections to the RDS host.
  • Allows reconnections to the RDS host.
Disabled

To set the RDS host in the disabled state, use the change logon /disable command or set the registry keys WinStationsDisabled = 1. The setting of the TSServerDrainMode registry key does not matter in this case.

Connection Server has the following behavior for the RDS host in the disabled state:

  • Does not send new connection or reconnection requests to the RDS host.
  • Routes new connections to other available RDS hosts in the farm.
  • Denies reconnections to the RDS host.
  • Horizon Administrator displays the Agent Disabled status of the RDS host.
Drain mode until restart

To set the RDS host in the drain mode until restart state, use the change logon /drainuntilrestart command or set the registry keys WinStationsDisabled = 0 and TSServerDrainMode = 1.

Connection Server has the following behavior for the RDS host in the drain mode until restart state:

  • Does not send new connection requests to the RDS host.
  • Routes new connections to other available RDS hosts in the farm.
  • Allows reconnections to the RDS host.
  • Horizon Administrator displays the Drain mode until restart status of the RDS host.
  • The RDS host is enabled after restart.
Drain mode

To set the RDS host in the drain mode state, use the change logon /drain command or set the registry keys WinStationsDisabled = 0 and TSServerDrainMode = 2.

Connection Server has the following behavior for the RDS host in the drain mode state:

  • Does not send new connection requests to the RDS host.
  • Routes new connections to other available RDS hosts in the farm.
  • Allows reconnections to the RDS host.
  • Horizon Administrator displays the Drain mode enabled status of the RDS host.