Kill inactive user sessions on a Windows Server 2012 R2 Terminal server

group-policywindows-server-2012-r2

I've been trying to configure a GPO to kill inactive sessions on a Windows Server 2012 R2 terminal server, but I can't seem to be able to get it done.

I went to Computer SettingsPoliciesAdmin templatesWindows ComponentsRemote Desktop ServicesRD Session HostSession Time Limits and configured:

  1. Set time limit for domain controller sessions → 30 minutes
  2. Set time limit for active but idle sessions → 30 minutes
  3. End session when time limits are reached → Enabled

I've checked and made sure the policy is applying to the server in question by running gpresult /r /scope:computer.

The problem is that, after 30 minutes, the user sessions that are inactive are still not killed, and they sit there in a disconnected state using memory resources that they shouldn't.

Am I missing something?

Best Answer

Edit:

Gah...I'm sorry, I didn't check your question correctly...Terminal Services are Remote Desktop Services now since Windows Server 2008 R2 (I think). Sorry!

Check your RDS settings on the server itself - not GPO -, under

Remote Desktop Session Host Configuration

(override user settings) and try specifying the time limits there.

Check the following GPO settings:

> Computer Configuration\Policies\Administrative Templates\Windows > Components\Terminal Services\Terminal Server\Session Time Limits

Your GPO settings are only for RDP sessions, not for Terminal Server sessions.