RDP Windows server 2019

in flag

I'm connecting to one windows server 2019 from another windows server 2019 through RDP, when i close the connection using the "X" button and then try to open new RDP connection i get a timeout on this new RDP, however on the other hand if i "logout" on the first RDP connection and then try open new RDP then the connection goes fine, it seems that closing RDP by clicking "X" button doesnt really trigger a "logout" and so i'm unable to login again, what configuration can be changed to make the "X" trigger a logout? or any workaround to overcome this, its inconvenient to use the "logout" everytime i get out

kz flag

You are looking at the wrong side of the problem. Yes, clicking the X on a RDP connection causes the user session to turn into disconnected state: All applications remain running, so that the user can return to the last state once he logs back in.

If I were you, I would try to figure out, what is causing the timeout. From your tags, I assume you are using a remote desktop gateway? That is probably where your problems come from.

But to answer your question, you could install easily a group policy (either via local group policy editor or via GPO on your domain controller) to end disconnected sessions after a certain amount of time (minimum is 1 minute).

You find this group policy in the following path: Computer Configuration/Administrative Templates/Windows Components/Remove Desktop Services/Remote Desktop Session Host/Session Time Limits

"Set time limit for disconnected sessions"

But beware! If a user clicks on the X, and has unsaved work - there will not be any warning, and all unsaved work will be lost...


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.