Код:

PS > quser /?
Display information about users logged on to the system.
QUERY USER [username | sessionname | sessionid] [/SERVER:servername]
username Identifies the username.
sessionname Identifies the session named sessionname.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server to be queried (default is current).
PS > tsdiscon /?
Disconnects a Remote Desktop Services session.
TSDISCON [sessionid | sessionname] [/SERVER:servername] [/V] [/VM]
sessionid The ID of the session.
sessionname The name of the session.
/SERVER:servername Specifies the Remote Desktop Session Host server (default is current).
/V Displays information about the actions performed.
/VM Disconnects session on server or within virtual machine. The unique ID of the session needs to be
specified.
PS> tskill /?
Ends a process.
TSKILL processid | processname [/SERVER:servername] [/ID:sessionid | /A] [/V]
processid Process ID for the process to be terminated.
processname Process name to be terminated.
/SERVER:servername Server containing processID (default is current).
/ID or /A must be specified when using processname
and /SERVER
/ID:sessionid End process running under the specified session.
/A End process running under ALL sessions.
/V Display information about actions being performed.