Solved

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

Posted on 2012-04-08
7
1,446 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.

762 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