- qwinsta –> Display information about Terminal Sessions.
- rwinsta –> Reset the Terminal session Ex: rwinsta <session ID> /server:<servername>
- Usage Examples:
- Find all the terminal service sessions:
C:>qwinsta /server:Test-SRV1
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console test-admin 0 Active wdcon
rdp-tcp 65536 Listen rdpwd
temp-admin 3 Disc rdpwd
demo-user 1 Disc rdpwd
C:>
End the session you want, say the one in disconnected state:
C:>rwinsta 1 /server:Test-SRV1 (This will end the session with ID ‘1’ that is of demo-user session running in disconnected state )
C:>
Verify that the session indeed got disconnected:
C:>qwinsta /server:Test-SRV1
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console test-admin 0 Active wdcon
rdp-tcp 65536 Listen rdpwd
temp-admin 3 Disc rdpwd
C:>