Solved

How to log off RDP Sessions that are Disconnected - Windows 7

Posted on 2012-04-08
7
1,399 Views
Last Modified: 2012-05-09
So the issue I have is that some Users will close the RDP window and not actually click Log Off on the Machine that they are remotely connected to. This will disconnect their session however it will keep their account running on the machine. So if do a Ctrl+Alt+Delete I can see their username under Users and it will say Disconnected but I need them to logoff.

The reason being is that I need users to go through a Log Off script that is set on the machine.

Is there anyway to have an account logoff the machine automatically when the user closes the RDP window and doesent actually click on Log Off ?
Thanks.
0
Comment
Question by:jkz11169
7 Comments
 
LVL 21

Expert Comment

by:motnahp00
Comment Utility
It's better to end a disconnected session through the properties of the Remote Host.

RD Session Host Configuration -> RDP-Tcp Properties -> Sessions tab -> Override user settings: End a disconnected session: x time
0
 
LVL 19

Expert Comment

by:R--R
Comment Utility
You can do it using GP and TS configuration..

check this from technet

http://technet.microsoft.com/en-us/library/cc758177(v=ws.10).aspx
0
 
LVL 53

Expert Comment

by:McKnife
Comment Utility
By the way... are we talking about win7 as a client connecting to a server or about a ("pimped") windows 7 being used as a server?
Anyway: Regarding task manager: it will not allow you to disconnect or logoff other users because of UAC. If UAC is enabled, you will have to start task manager elevated in order to be able to logoff users (otherwise : "access denied").
0
 

Author Comment

by:jkz11169
Comment Utility
I guess let me be more clear. This is from Windows 7x64 Enterprise to Windows 7x64 Enterprise and it is using Remote Desktop Connection.

When the Remote Desktop Connection window is closed, it says this: " This will disconnect your Remote Desktop Services session. Your programs will continue to run while you are disconnected. You can reconnect to this session later by logging on again"

I am trying to prevent this from happening and want the users account logged off instead of the account kept in a "Disconnected" status and running in the background.

As far as the first two posts:
I went to the local group policy editor under
Computer Configuration/Administrative Templates/Windows Components/Remote Desktop Services/Remote Desktop Session Host/Session Time Limits

And have modified the "Time limit for Disconnected Sessions" and "Terminate session when time limits are reached" however this doesent do anything, the accounts dont actually get logedoff and stay in a Disconnected state.

Note: I do not have Terminal Services under Windows Components, is this something I need to add in via Turn Windows features on or off?

The reason that I want all of this done is that I have a logoff script that needs to run, however someone who just closes the RDP window will have their account go into the Disconnected stated and not do an actual logoff.
0
 
LVL 53

Accepted Solution

by:
McKnife earned 500 total points
Comment Utility
Hi.

Make sure that after you modify the "Time limit for Disconnected Sessions" and "Terminate session when time limits are reached", you take a new connection for a test, Because changing these settings only applies to connections started thereafter.
I do not have Terminal Services under Windows Components, is this something I need to add in via Turn Windows features on or off?
This will not apply to windows 7 as terminal services cannot be installed on 7 (but remote desktop is integrated in 7).
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now