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:
Unfortunately, after selecting Log Off, I always get this error regardless of the fact that I am an administrator:
The only way I’ve managed to disconnect the user is using the command prompt.
First, type qwinsta to see the list of sessions:
Now we simply issue the command rwinsta followed by the ID of the user:
For more info on connecting to remote sessions, please visit the source URL: