LKBEN10858: Howto count the logged on users on a terminal server from the command line using an ica session

This article has not been checked!

LKB | Created: 02/04/2020 | Version: 0 | Language: EN | Rating: 0 | Outdated: False | Marked for deletion: False

Author: Wim Peeters - Keskon GmbH & Co. KG


You want an easy way to count the logged on users on a terminal server from the command line




If you want to count the logged on ICA sessions on a terminal server you can use the quser command. This command shows you the users logged on but you will have to count them yourself. A relatively easy way to find out how much users are currently on your server you can use the find command with the /N parameter. This will not show you the right result! If you use it twice, the second output will show you the right result!


quser|find /i "ica"|find /i "ica" /N

if you would just use

quser|find /i "ica" /N

Your result will show the lines where ICA has been found.

Just try

quser|find /i "ica"|find /i "ica" /N

and you will understand what I mean.

About the Author

Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux in different European countries and different European languages. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform where he is one of the most important contributors and the main developer.


The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!