locked
How to force logoff local users with status disconnected RRS feed

  • Question

  • Friends nice day
    I need to force the logoff of sessions that are with the status disconnected, locally on workstations.
    This occurs when users perform interactive login and do not make the off, only block the workstations and the new user makes trading account and logs on.
    How do I force the logoff of these accounts?

    Att.
    Marcus


    Wednesday, January 21, 2015 2:35 PM

Answers

  • Hi,

    I haven't found a way to automatically logoff the local disconnected sessions at a scheduled time, cause it's hard to detrermine which user session is disconnected at that specific time. but we can use  "query seesion" and "logoff" command in a local machine or remote machine to manually logoff the disconnected sessions.

    The following is an example to exectue this from another remote machine, use psexec command


    Yolanda Zhu
    TechNet Community Support


    Friday, January 30, 2015 2:22 AM

All replies

  • I need to force the logoff of sessions that are with the status disconnected, locally on workstations.

    Hi Marcus,

    Could you please describe the issue in more details? Are you referring to a RDP session, Did you mean that you want to remote logoff a user who is currently logged on? Normally, reboot the PC will be an option to logoff all users.

    The following link can also be helpful

    Log Off a User from a Session

    https://technet.microsoft.com/en-us/library/cc755252.aspx

    Or the logoff command

    https://technet.microsoft.com/en-us/library/cc731280.aspx


    Yolanda Zhu
    TechNet Community Support

    Thursday, January 22, 2015 6:22 AM
  • Yolanda Zhu.

    My problem is very simple.
    I need only force the log off accounts that are locally with the disconnected status.
    It's not about the RDP, but the exchange of local user.
    I need a script or enable a GPO to kill these sessions.
    Because I enabled the disconnect timeout in the local GPO and did not work as it is for RDP and not for interactive logon.

    Tk's!

    Marcus

    Thursday, January 22, 2015 10:00 AM
  • Yolanda.

    Do you have a any position for my problem ?

    Marcus

    Friday, January 23, 2015 7:30 PM
  • My problem is very simple.
    I need only force the log off accounts that are locally with the disconnected status.

    Hi,

    Do you mean local user account? Or Microsoft Account? Do you have other available Administrator account?

    Have you tried the reboot option as I mentioned in my previous reply, it can logoff all user account, or if you can login to another user account, you can launch task manager\User, then right click the disconnect user account, click "sign out user"



    Yolanda Zhu
    TechNet Community Support

    Monday, January 26, 2015 8:57 AM
  • Yolanda this is my problem.
    But I need to create a schedule that remove automatically all session that has disconnected.
    Do you have a any ideia?
    Marcus

    Monday, January 26, 2015 12:42 PM
  • Hi,

    I haven't found a way to automatically logoff the local disconnected sessions at a scheduled time, cause it's hard to detrermine which user session is disconnected at that specific time. but we can use  "query seesion" and "logoff" command in a local machine or remote machine to manually logoff the disconnected sessions.

    The following is an example to exectue this from another remote machine, use psexec command


    Yolanda Zhu
    TechNet Community Support


    Friday, January 30, 2015 2:22 AM
  • Thank you!

    Tuesday, February 3, 2015 7:15 PM
    1. Open "Run" and type "gpedit.msc" 
    2. Go to "User Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits"
    3. Double Click on "Set time limit for disconnected sessions" and select enable then set time to "1 minute"
    • Proposed as answer by Emin Akbulut Monday, December 17, 2018 6:28 AM
    Tuesday, December 4, 2018 12:23 PM
    1. Open "Run" and type "gpedit.msc" 
    2. Go to "User Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits"
    3. Double Click on "Set time limit for disconnected sessions" and select enable then set time to "1 minute"
    so i have this set but all sessions that where disconnected prior to this GPO being applied are not logging off?
    Thursday, July 16, 2020 12:44 PM