Last Update: Sep 04, 2024 | Published: Jun 16, 2016
In today’s Ask the Admin, I’ll show you how to quickly get a list of users connected to a server via Remote Desktop (RDP).
Whether you have a fully-fledged Remote Desktop Services (RDS) deployment, or just want to see which administrators are managing a server, there are several ways to view the users currently connected via RDP.
If you have a RDS deployment on Windows Server 2012 R2, it’s worth noting that there’s no Remote Desktop Services Manager management console in Windows Server 2012 and later. Server Manager displays some useful information about RDS and PowerShell can also be used to install, configure and manage RDS.
The Task Manager’s Users tab gives a list of currently logged in users, but by default doesn’t indicate whether they are logged in at the terminal or remotely. That can be easily rectified by adding the session column to the view.
Log in to Windows Server 2012 R2 and follow the instructions below to view the active remote users:
In Task Manager, you’ll now be able to see a list of users and if they’re logged in using RDP, it will be indicated in the Session column. The instructions above also work in Windows 8.1 and 10.
The same information can also be obtained by simply running quser from the command line. If you want to query users on a remote computer, just add the /SERVER parameter followed by the name of the remote server.
quser /server contososrv1
Similar to quser, qwinsta displays users logged in to a RD Session Host, along with information about whether at the console or via an RDP session.
If you have a RDS deployment and need more information, you can run the Get-RDUserSession cmdlet to get information about connected users, session IDs and host servers. You can also see users connected via a specific connection broker:
Get-RDUserSession -ConnectionBroker rdp1.ad.contoso.com
In this article, I showed you how to view the users logged in remotely to Windows Server 2012 R2 and RDS deployment. Keep a look out on Petri for some more detailed articles on installing and configuring RDS deployments using PowerShell in Windows Server 2012 R2.