Handling the pop-up window while logging into RDP session

1

How do I remove or prevent the pop-up dialog which shows when trying to log into an RDP session through mstsc?

This dialog below is shown when the logged sessions already exist for that remote machine.

RDPSessionsPop-up

Kiran Angara

Posted 2016-08-19T12:19:23.040

Reputation: 19

Kiran - Would you mind giving me an update on this when you get this message and shoot me back another message? – Pimp Juice IT – 2017-07-07T02:57:30.473

Answers

0

This window appears because there are two active, disconnected sessions on the target machine. Whenever such situation occurs it will be displayed and you'd have to choose which session you should connect to.

You can avoid the message being displayed only by keeping one disconnected session or non at all.

In this situation you need to connect to one of the sessions and close it by logging out.

techraf

Posted 2016-08-19T12:19:23.040

Reputation: 4 428

Thanks. Let me put it in this way, whether we can handle the pop-up dialog even when there are multiple sessions enabled for the remote machine? – Kiran Angara – 2016-08-20T14:16:21.713

0

You can prevent this from occurring by setting applicable Group Policy settings on this server from gpedit.msc.

Remote Desktop Services will be restricted to a single session (either active or disconnected) on that server. If the user leaves the session in a disconnected state, the user automatically reconnects to that session at the next logon.


Disable Multiple RDP Sessions

  1. Log into the server using Remote Desktop.
  2. Open the start menu and type 'gpedit.msc' and open it
  3. Go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.
  4. Set Restrict Remote Desktop Services user to a single Remote Desktop Services session to Enabled. enter image description here

source

Pimp Juice IT

Posted 2016-08-19T12:19:23.040

Reputation: 29 425

As per your suggestion, it is to restrict the sessions on remote machine. But what i exactly need is to handle the pop-up even if there are multiple sessions enabled for that machine. – Kiran Angara – 2016-08-20T14:10:42.970

@KiranAngara All this setting does is say that for example, if you have an account on this server with a username of for example KAngara, then that specific accounts can only have one session so if that's the case, it will prevent that message from ever popping up and you will always just take over the already exising one session with that same account. You'd still be able to have multiple sessions with different user names if though if that's you concern. – Pimp Juice IT – 2016-08-20T16:31:39.963

@KiranAngara To handle this pop up otherwise, you basically need to select one (likely the one that's been disconnected the longest?) and tell it which session to take over for that account. This isn't a complex problem so you can either prevent it, or pick which session to take over when it occurs. To ensure the session always uses the same one session, put the settings in place as I indicated in my answer. – Pimp Juice IT – 2016-08-20T17:22:37.710