There are 2 CLI commands that are very useful when it comes to managing remote Terminal Server sessions.

Which users are connected to a remote computer using TS?

qwinsta /server:[_servername_]

Let’s stop one of these open sessions:

rwinsta [_session_id_] /server:[ _servername_ ]