How to Remotely Disconnect a User in Windows Server

How to Remotely Disconnect a User in Windows Server

Some Windows installations (like upgrading Windows Server 2008 R2 to Windows Server 2012) will not let you upgrade if there is a user logged on the machine.  Even if the user is disconnected, the upgrade will not take place.

Easy enough, you think, I only need to bring up the Task Manager, switch to Users and click Disconnect:

Disconnecting a user using Task Manager

Unfortunately, after selecting Log Off, I always get this error regardless of the fact that I am an administrator:

Denied!

The only way I’ve managed to disconnect the user is using the command prompt.

First, type qwinsta to see the list of sessions:

This helps us find the ID of the user we want to disconnect

Now we simply issue the command rwinsta followed by the ID of the user:

Success!

For more info on connecting to remote sessions, please visit the source URL:

http://www.techtalkz.com/blog/tips-n-tricks/how-to-view-disconnect-remote-desktop-sessions-from-commandline.html

One response to “How to Remotely Disconnect a User in Windows Server”

  1. Rudi says:

    Thank you, thank you and 1000 times more, thank you

Leave a Reply