List the current log on session(s):
C:\>quser
List the current log on session(s) on the remote desktop computer:
C:\>quser /SERVER: xx.xx.xx.xxx
To log off session listed in the previous step, use the following command. Here I am trying to log off the session 0.
C:\> logoff /SERVER:xx.xx.xx.xxx 0 /V
(Source)