How do disconnect a RDP-Session with a Windows Server (Windows Server 2012 R2) without the user being logged out? The problem is that the program running on the server stops working after I disconnected from the RDP.
This depends on settings in the server, in which you can modify the time to wait for a disconnected sessions. Here are in two ways.
Using Terminal Services Configuration, Connections :
In the details pane, right-click the connection for which you want to modify time-out settings, and then click Properties.
On the Sessions tab, above End a disconnected session, select the Override user settings check box. This allows you to configure time-out settings for the connection.
Using Group Policies, in Computer Configuration, Administrative Templates, Windows Components, Terminal Services, Sessions, enable the required settings.
The setting you may want to modify are End a disconnected session, Active session limit
and Idle session limit.
I suggest modifying them to "Enabled" and
Never, rather than leaving them as Disabled.
For more detailed information, see the article
Set time-out settings for disconnected, active, and idle sessions.