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:
- Open group Policy by running gpedit.msc.
- 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. - Right-click on Set time limit for disconnected sessions.
- Select Properties.
- Check Enable and select time you want under End a disconnected session.