Score:1

When do changes to the group policy take affect for remote desktop idle times?

pk flag

I was setting up idle time settings for remote desktop services since I have users that are leaving themselves logged in at night with programs open.

This is a Windows 2019 Standard server with remote desktop services installed. We have clients connecting but I'm show odd idle times.

For example:

enter image description here

I know that the person I have highlighted was active up until a few hours ago. If I'm understanding this correctly, they've been idle for a day and 11 hours. Is that correct?

I changed the "End a disconnected session" to 2 hours. Does this take affect immediately or do I have to wait for 2 hours for the timer to start? I set it to 5 minutes to test this and the idle and disconnected users were not affected. They remained logged in. I'm not sure if this is working correctly or if I should be doing something else? Is a restart required after making changes to the group policy?

enter image description here

joeqwerty avatar
cv flag
By default, Group Policy refreshes every 90 minutes with a random offset of 0 to 30 minutes. If you want it to refresh immediately you can reboot the server (for computer configuration settings), log off and on (for user configuration settings), or run **gpupdate** from a command prompt.
cn flag
Have you verified the settings in the policy on the server?
Score:1
cn flag

[...]If I'm understanding this correctly, they've been idle for a day and 11 hours. Is that correct?

No, because there's a catch... or two...

The Idle Time reported by Remote Desktop Services is misleading because the value is only relevant when the Session State is: Disconnected.

When a user disconnects (for example, by closing the RDP window without logging off), Windows will update the Session State from Active to Disconnected and update the Disconnect Time too. The Idle Time value is simply the difference between "Now" and the Disconnect Time. So far, so good, because a user disconnects, the session state is updated, the Disconnect Time is updated too, and when you open up the Server Manager, the Idle time column shows you the time elasped between the value shown in Disconnect Time and Now.

However, here comes the first catch: When a user Reconnects to their Disconnected session, Windows will update the Session State from Disconnected to Active again, but the Disconnect Time value will not be erased, the Disconnect Time still shows the last time the user disconnected, and the Idle Time value will still happily show you the time elasped between the value shown in Disconnect Time and Now. And because the session is Active, this value is meaningless (the session is idle only when Disconnected, and now the session is Active).

However, the second thing you should be aware of is that there is another "Idle" concept: The time elapsed between the last user input when the session is Active. That's the case when the user is technically connected to the Session Host ("Active") but away from their device, or when the user is not interacting with the RDP window. I call that the "last input time", and Windows will not show you this value.

Now, let's summarize this:

  • We have the "Idle Time" shown in Server Manager => That's the time elapsed between the value shown in "Disconnect Time" and "Now". Forget about this value if the session state is "Active". Let's call this value the "Session Idle Time" for the sake of simplicity.

  • We have the "last input time" too, that's the last time the user did something within their Active session. Windows keeps track of this but will not show you this value.

Now we can talk about managing the timeouts.

First of all, I recommend you to set the policy you configured ("Set time limits for disconnected session") back as "Not Configured" because we should manage this from the Session Collection settings. You can use the group policy if you have special needs that you can't address with Session Collection settings, but please be sure that you are not configuring different values between Session Collection settings and Group Policy, and that you can keep track of your settings.

Here we can see where we can manage the timeouts in the Session Collection settings, I'll explain these settings below:

Session Collection settings

End a disconnected session: Here you can tell Windows when you want to Log Off sessions shown as "Disconnected", that's based on what I call the "Session Idle Time" i.e. the "Idle Time" shown in Server Manager. This settings will have no effect on "Active" sessions.

Active session limit: That's to prevent user from keeping their session Active indefinitely, be careful with this setting because it will disconnect the user even if they are actively working.

Idle session limit: With this setting you can ask Windows to Disconnect an Active session when the time elapsed since the "last input time" exceeds a certain value. i.e: The user is away from their device, and stopped interacting with their Session but the RDP connection is still established. When the Idle Session Limit value is exceeded, Windows will Disconnect the session (now the session shows up as "Disconnected" in your Server Manager and the "End a disconnected session" timer will start counting).

Consider this: if you set the Idle session limit to 1 hour, and the End a disconnected session value to 1 hour too, this means that when a user stops interacting with their RDP window, the system will Disconnect the session after 1 hour (the user can still Reconnect and resume their work) and at this point the second "timer" will kick in and after another hour the End a disconnected session value will Log Off the user session (2 hours after the user stopped interacting with the session).
Of course, if the user closes their RDP client, the session switches immediately in the "Disconnected" state and the "End a disconnected session" value will Log Off this user after 1 Hour ("Idle session limit" is ignored because the session is already Disconnected).

You asked if the setting takes effect immediately: As far as I can tell, the new settings applies only to new sessions established after modifying the settings in the Session Collection, existing sessions should not be affected.

pk flag
wow excellent response, tyvm!
mangohost

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.