By Ellie / Last Updated January 6, 2022

How to end a Remote Desktop session completely

“I completed a Remote Desktop session between two computers on our network. I right-clicked the Close button at the top of the screen, where you can see the computer to which you are connected. But I’m curious if this just closes the screen of the remote computer on the computer you’re working on or if it completely logs off the remote computer?”

Three ways to log off the remote computer

To help you log off the remote computer instead of just closing the screen of the remote computer, here we listed three tested methods.

Method 1. Sign out using Ctrl + Alt + End

The easiest to completely end a Remote Desktop session is to press Ctrl + Alt + End altogether on the remote computer. Then you’ll see the following screen show up. Click Sign out to log out of the remote desktop.

Remote Server Sign Out

Method 2. End a remote session using Session ID

Step 1. On the remote computer, right-click the Start menu in the bottom-left corner, and then click Command Prompt.

Command Prompt

Step 2. Type “query user” and hit Enter.

Query User

Step 3. Then you will see a list of users on the server. Find your user name in the list and note the session ID number. In the below example, my session ID is 291.

Remote Session ID

Step 4. Type “logoff” followed by a space and the session ID you wish to log off. Then hit Enter.

Log Off Session

Step 5. Then you’ll see the remote session signing out.

Sign Out Rmote Session

Method 3. End a remote session using qwinsta and rwinsta commands

Step 1. On the remote computer, open Command Prompt. Run the command qwinsta to get all Remote desktop sessions on the server. Type in the following command:

qwinsta /server:SERVER NAME

Note: Replace SERVER NAME with the name of your server. For example, here my server name is wowhvdev1, then I need to type in the following command and press Enter:

Qwinsta Server

Step 2. From the list of sessions, find the one you want to end and note down its ID. Then enter the following command:

Rwinsta /server:wowhvdev1 RemoteID

Note: Replace RemoteID with the ID of the session you want to end. For example, here the ID of the session that I want to end is 11, then I need to type in the following command and press Enter:

Rwinsta Server

AnyViewer: Remote desktop software easy to log off

AnyViewer is the free third-party remote desktop software for Windows. The way to end a remote session on AnyViewer is quite easy compared to Remote Desktop. You just need to click the close button on the upper-right corner, then the whole remote session will completely end. See, it’s pretty easy.

End a Remote Session

Besides, AnyViewer also provides you with easy and simple connection methods. If you need to help one of your friends to troubleshoot some computer problems, you can send a control request to him. Once he accepts your control request, you can get full control of his computer. If you need to remotely control an unattended computer, for example, control your office computer from home, you can input the security code you set before to achieve unattended remote access.

Download Freeware Win 11/10/8.1/8/7
Secure Download

Conclusion

This post summarizes three methods on how to end a Remote Desktop session completely. Firstly, you can sign out a remote session using Ctrl + Alt + End combination. Secondly, it’s possible to end a remote session using its Session ID. Finally, you can also end a remote session using qwinsta and rwinsta commands.

At the end of the post, we recommend the free remote desktop software AnyViewer to you. AnyViewer is easy to connect to and also very easy to log off. If you are worried about not logging off the remote computer after you end a remote session, you can use AnyViewer to easily get this done.