Kick User from Remote Desktop Session

via Command Line

1. Determine the name or ID of the session that you want to disconnect. From Start, go to Run and execute command query session in command prompt.

C:\>query session
 SESSIONNAME       USERNAME              ID  STATE   TYPE        DEVICE
>rdp-tcp#981       ITsitiAdmin            0  Active  rdpwd
 rdp-tcp                              65536  Listen  rdpwd
 console                                  2  Conn    wdcon
 rdp-tcp#946       ITsitiAdmin            3  Active  rdpwd
 rdp-tcp#947       ITsitiAdmin            1  Active  rdpwd

2. Yeay!..now the kicking party begin. In this example, we are going kick the SESSIONAME rdp-tcp#946. Follow the step below and verify the user session again.

C:\>tsdiscon rdp-tcp#946
C:\>query session
 SESSIONNAME       USERNAME              ID  STATE   TYPE        DEVICE
>rdp-tcp#981       ITsitiAdmin            0  Active  rdpwd
 rdp-tcp                              65536  Listen  rdpwd
 console                                  2  Conn    wdcon
                   ITsitiAdmin            3  Disc    rdpwd
 rdp-tcp#947       ITsitiAdmin            1  Active  rdpwd

Note:
You can see at the STATE area is stated Disc which mean the user is disconnect from the remote desktop session.

via Windows Task Manager

1. Open your Windows Task Manager. Under Users, click on the user that you wanted to kick and select Logoff.

You May Also Like

Leave a Reply?