Analyzing the incoming requests from our clients to the technical support service and contacting consultants, we noticed that many of our clients are faced with such a problem as “avtovyhod”, not understanding what it is and how to deal with it.
Any server, including a
virtual server, should work 24 x 7 x 365 permanently. And, accordingly, the user who runs programs on the server expects that they will work in the same mode. This is what our customers are counting on. However, installing various kinds of desktop software on the
VPS , which was developed by the “craftsmen” without thinking that there are computers that do not have monitors, disconnecting from the server after a while notice that its program has stopped working properly, while the server is active and available. This is usually noticed the next time you connect to the server to analyze the data with how the software was meant to work. The problem is, obviously, that this software is trying to take something from the properties of the screen (resolution, cursor position, etc.), while there is no screen or cursor when the session is off.
This problem is a special case of limiting the work of sessions in time, which is the responsibility of the “Remote Desktop Services” group policy node with the same name “Limit Sessions in Time”. It allows you to flexibly customize the running time of running sessions or your employees on the server when organizing workplaces, which allows you to more optimally use the resources of a rented
Windows VDS server.
Launch the
Local Group Policy editor on the server by pressing the key combination
Win + R and typing the command
GPEDIT.MSC')

Next, you need to go to the next path in the
"User Configuration" branch, if you want to make settings for the current user or in the
"Computer Configuration" branch, if you want to configure for all server users.
-> Windows -> -> -> .

We see that the time limit parameters are not explicitly set and they can be configured for the following situations:
- For disconnected sessions
- For active but inactive sessions
- For active sessions
- RemoteApp session
Consider each of them in some detail.
1. "Set a time limit for disconnected sessions"
With this parameter you can specify the time interval in minutes, hours or days during which open programs will continue to work after disconnecting from the server.
If you want your program to work on the server in a constant mode and there is no “auto-exit” when disconnecting, then this parameter should be specified as Enabled and select Never. What is the solution to the above situation.

This parameter can also be used at times when an employee’s work day is finished, but some autonomous processes that do not require user intervention need additional time to run, in this case, you can specify Enabled and specify the amount of time required.
2. “Set a time limit for active but inactive remote desktop service sessions”
Inactive session is considered to be the session when the remote desktop starts to idle without any input operations, from the user. An employee can connect to a remote desktop server, and then at the end of the working day simply forget to disconnect from the server and go home. In this case, the session is active, but it is idle and the resources allocated by the server and reserved for this user are idle and, accordingly, are not spent efficiently. In this case, you can specify Enabled and specify the required amount of time, after which when idle, the session will be terminated.

3. "Set a time limit for active remote desktop service sessions"
This parameter is responsible for the completion of even an active session, say if the policy of your company is quite strict control of working hours and processing is not allowed. Then you can set this parameter to Enabled and specify the maximum period of working time. Accordingly, upon completion of the working day, the session of even the active user will be terminated, but two minutes before disconnecting, the user will be provided with a warning message so that he can save all changes made during the connection and open working documents.

In the second and third cases, it is necessary to enable the "End session when the time limit is reached" parameter. Enabling this parameter indicates that the user’s session is completed, otherwise, only the session will be disconnected, but not its termination.


4. "Set a time limit for exiting RemoteApp sessions"
This parameter allows you to end the session at a time when you did not make a connection to the remote desktop of the server, but the connection to the server was established using third-party programs. When the program is closed, if the “Not set” parameter is set, the session is disconnected, but not terminated. To end the session, you must specify Enabled and set the time; the “Immediately” option is also available.
