Remote Desktop auto disconnect and logoff

From http://www.howtonetworking.com/casestudy/tstimelimit1.htm

To set time limits for automatically disconnecting or logging-off a user from a remote desktop session:

  1. Open group Policy by running gpedit.msc.
  2. Select Administrative Templates > Windows Components > Terminal Services > Sessions.
    In Windows 2008: Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits.
  3. Right-click on Set time limit for disconnected sessions.
  4. Select Properties.
  5. Check Enable and select time you want under End a disconnected session.