Query Session /SERVER:SERVERNAME
reset Session SESSIONID /SERVER:SERVERNAME
Example:
qwinsta /SERVER:ràShows the active connections
C:\Documents and Settings\UserAlias> qwinsta /SERVER:ServerName
SESSIONNAME USERNAME ID STATE TYPE DEVICE
rdp-tcp#21 user1 0 Active rdpwd
rdp-tcp 65536 Listen rdpwd
console 5 Conn wdcon
To remove an active connection use the below command:
rwinsta [ID] /server:SERVERNAME
rwinsta 0 /server:ServerName à user1 will be logged off in this case.