SERVICE DESK
Users logged in to RDS
.
IT Service Desk
Version: 1.2
Date: 23/02/2023
This article will describe 3 methods of listing users logged to RDS cluster and how to disconnect stuck sessions for each of them.
Bear in mind I do recommend to use method 2 but for the sake of completeness we will go through some other methods as well.
1. Straight forward approach
The most obvious method is to just log into the server and disconnect user. The RDS is a cluster of servers so this method is not the best as you need to know which server user is logged into.
Please DON’T log into servers just to disconnect users as that is taking away resources(CPU and RAM) for your session. As mentioned above the better idea is to use one of other 2 methods.
As mentioned we do not know which server the user is logged into, the broker is dividing users between multiple servers so you have to log into each of them and search for user. List of servers include:
vmrdspro1app02
vmrdspro1app03
vmrdspro1app04
vmrdspro1app05
vmrdspro1app06
vmrdspro1app07
vmrdspro1app08
vmrdspro1app09
vmrdspro1app10
After you log into one of them please open Task Manager and go to Users:
If the user is on the list you will be able to disconnect them:
If not, you will have to check another server from the cluster.
PowerShell method
Another method would be to use PowerShell and list the users from particular server. As in the previous method we don’t know which server that is so we need to check them one by one.
The PowerShell command is
quser /server:”servername”
Where “servername” is just host name of server. Keep in mind it works with every PC on the network, not only RDS cluster
The most important bit of information will be user name to locate the user and the session ID used to disconnect them.
After you located user you can disconnect the session by using command:
logoff “ID” /server:”servername”
Where “ID” is the session ID and “servername” is the name of the server the user is logged in. Example:
That is the quickest way to log out user from server and it is strongly recommended.
- List the users on the broker server
In order to see who is logged into RDS cluster regardless of which server they are using:
Log into vmrdspro1app01 server using RDP app and open Server Manager
it should be pinned to start menu, and should be looking like on the screenshot bellow, go to top right corner and click on Manage > Add Servers
In the freshly opened new window go to Active Directory tab and type “vmrds” as Name (CN), click on Find Now and select RDS servers numbered 1 through 7 then send them to selected part using button with arrow in the middle of the window. After doing that click OK.
The synchronisation will take couple of minutes and during that time you might receive some permissions error as you won’t have access to every single thing on the cluster.
After the synchronisation is done refresh the Server Manager or close it and re- open. Now you will get more options in Remote Desktop Services tab and under Collections > StepChange RDS Users you will have list of users.
Bear in mind the above needs to be done only once, you don’t have to go through entire process every time.
We can then disconnect sessions just as in Task Manager. This is better method than the 1st as you don’t have to go through servers one by one.