wolfgang ziegler


„make stuff and blog about it“

Enumerate RDP Sessions on a Windows Server

July 10, 2012

To enumerate existing RDP sessions on your local host, simply use the qwinsta command.

image


You can also specify a server name or ip address for a remote machine: e.g. qwinsta /server:10.5.2.44

image

If you want to log off any of these session (assuming your have the required privileges) you can use the command rwinsta, which additionally accepts the name or id of a session.

If you run e.g. rwinsta 2 /server:10.5.2.44 and then enumerate the existing sessions again, the session with id 2 has disappeared.

image