Link to home
Start Free TrialLog in
Avatar of jkz11169
jkz11169

asked on

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

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.
Avatar of motnahp00
motnahp00
Flag of United States of America image

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
Avatar of R--R
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
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").
Avatar of jkz11169
jkz11169

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of McKnife
McKnife
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial