Solved

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

Posted on 2012-04-08
7
1,424 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
ID: 37822190
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
ID: 37822303
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 54

Expert Comment

by:McKnife
ID: 37824379
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
ID: 37825916
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 54

Accepted Solution

by:
McKnife earned 500 total points
ID: 37826592
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This article runs through the process of deploying a single EXE application selectively to a group of user.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

773 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