How to manage Terminal Services Sessions Remotely?
Have you ever had to remote into a server , but unable to log in as the server had exceed the maximum number of 2 sessions? Frustrating isn’t it?
QWINSTA and RWINSTA to the rescue and their definitions are as follows:
- QWINSTA: Query WINdows STAtion
- RWINSTA: Reset WINdows STAtion
Click to Enlarge
How to use:
- Run the command: QWINSTA /server:xxx.xxx.xxx. Where xxx.xxx.xxx is the ip address you wish to RDP into. You can also key in the server name instead.
- Look for the USERNAME, ID, and STATE columns. Mark the ID for the connection your wish to reset (kill). Usually, it is the one with the STATE of disconnected (Disc). If you must reset one that’s active, you should pick up the phone and call that individual.
- To kill the session that you had identified, run the command
RWINSTA ID /Server:xxx.xxx.xxx. Where xxx.xxx.xxx is the ip address
of the server and ID is the session ID you wish to reset.
Example:
QWINSTA /Server:Server1
RWINSTA 0 /Server:Server1