Remotely log off a rdp session/log off user remotely

Open command prompt with a user name that has access to remote server. If local and remote server are in workgroup, its easier if you have same account with password in both servers. Either you should log in with the account name on local pc and open a command promt or you can run as different user and open command prompt.

Qwinsta /server:servername or ipaddress

It will list you all the logged on sessions on the remote server. Now using the session id, we can log off the user from remote server.

Qwinsta /sessionid /servername or ipaddress