Can you restart the TS Session Broker service without it disrupting current sessions

I have six Microsoft terminal servers in a NLB cluster, running under a Windows 2008 DC. This DC is using the new TS Session Broker service (session directory?)  Sometimes I have a problem where I need to take one of the terminal servers out for maintenance. During this time, the sessions build up on the remaining servers in the cluster.  Although the NLB service and session broker is supposed to balance the load, sometimes it does not. The priority 1 server builds up until it hits it's maximum capacity. When the next person goes to connect, it does not connect to them to priority 2 server. Instead, it just says it cannot connect to the cluster.  Is there a way to make session directory forget that a particular user logged onto a particular server? Can you restart one of the services without disrupting current sessions?  In other words, I would like to be able to log off a couple of users (from the maxed server) and then have them reconnect, but the system would connect them to the east busiest server.
Who is Participating?
ConnectNZConnect With a Mentor Commented:
I have this problem all the time as well. Have you tried the "Drain" command?

Open a prompt and type "change logon /query". You can use this with /drain to deny new logons to any given server when it is maxed out or scheduled to go down for maintenance. The session broker will then direct new connections to a different server (but allow reconnections to existing sessions).  If you want to allow logons again without having to restart, there is a registry key that you can reset back to 0 - HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\TSServerDrainMode.

And yes, you can safely restart the TS Broker Service without impacting users.
wootenj2001Author Commented:
Thank you very much for the information. I'm going to test this today or tomorrow to see if  I can replicate it.  It sounds reasonable to me though, so I will probably accept the solution.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.