Solved

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

Posted on 2012-04-08
7
1,462 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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…

752 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