How do I find out which remote desktop sessions are active on a Windows Server 2003 box?
-
Here's the same question for Windows Server 2012, in which Terminal Services Manager is no longer available: http://serverfault.com/questions/471224/how-do-i-access-the-list-of-currently-logged-on-users-through-terminal-services/. – Jan 20 '15 at 16:59
5 Answers
The commandline way, which you can even remotely use, is
qwinsta /SERVER:{servername}
which will list the current sessions and their status, and with
rwinsta /SERVER:{servername} {sessionid}
and the proper privileges you can disconnect a session, particularly useful when the limit has been reached and you are not connected.
{sessionid} is the ID number listed in qwinsta's result
- 103
- 4
- 1,523
- 2
- 15
- 20
-
-
I get "qwinsta : No session exists for *" but running "query user" on the server directly clearly shows two sessions. – rob Oct 02 '17 at 13:52
Start -> Administrative tools -> Terminal Services Manager
Click on your servers name and it will list the active sessions on the right, there is also a field for the session state. Another tab called 'Sessions' will show active users, listeners and the console sessions.
- 1,504
- 2
- 15
- 24
If you have a remote desktop open to the server in question, you can see other sessions on the same server in the Task Manager (Ctrl-Shift-Esc
).
- 621
- 1
- 3
- 8
-
Yes and the good thing, is that you can even disconnect or logged them out (if you're admin). – рüффп Jul 16 '21 at 09:55
I'm a developer who was unable to RDP to a server because all available sessions were in use. I don't have Terminal Services manager, so none of the answers above applied. I use powershell for this kind of Windows service management, and I had success using the PowerShell module PSTerminalServices, which is from a MS employee (or group). Hit the link to install the MSI, then run the following from PowerShell:
Import-Module PSTerminalServices
Get-TSSession -ComputerName _MyRDPServer_ | Out-GridView
- 143
- 8
Using Task Manager you can click on the Users Tab to see which sessions are running. Right-click on a User to disconnect or logoff.