How to limit concurrent application instances in a Remote Desktop Services Environment?

Hello Experts!

I am running a Remote Desktop Services farm environment on Windows Server 2008 R2 Standard servers. For licensing purposes, I wish to limit the number of times a specific application can be run concurrently across the farm. That is, I have 'x' licenses for application 'y', and need to make sure that no more than 'x' users are running the application at any one time inside their remote desktop sessions.

I can't find any documentation as to how I might be able to do this using Remote Desktop Services, or a third party tool. I do know that this is somewhat possible using Citrix products.

Any advice as to how I might achieve this would be appreciated.

Thanks,
Nick
nickfridayAsked:
Who is Participating?
 
Cláudio RodriguesConnect With a Mentor Founder and CEOCommented:
This is possible with third party tools like AppSense.
If you want to do on your own you can of course script it.
What you need to know is how many TSs you have and their names/IP.
On your script you then run a QUERY PROCESS command to get the list of processes running on each server.
After parsing the output all you need to do is to find if such process is on the list and count how many times. If it exceeds your threshold you simply do not launch it.
The key is of course to always use your script to launch the application so ideally the script would take one parameter (the process you are looking for) and if it does not exceed the limit, it launches it. If it exceeds it throws a message to the user.
A good start is shown here (in VBScript instead of using QUERY PROCESS).
http://www.eggheadcafe.com/forumarchives/scriptingVisualBasicscript/Aug2005/post23120819.asp

Cláudio Rodrigues
Citrix CTP
0
 
nickfridayAuthor Commented:
Thankyou tsmvp that has given me some ideas.
0
All Courses

From novice to tech pro — start learning today.