Enumerate logins on a citrix/terminal server using vb.net

Posted on 2010-04-07
Medium Priority
Last Modified: 2013-11-21
Hey all,

We have a citrix farm with a handfull of windows 2003 servers that provide for a bunch of our sites.

Each site should have one computer on their front desk that logs in as special user that runs a specific program that should be running 24/7.

In part of a program I'm writing I want to be able to query our servers to make sure.
   A. The special user is logged in somewhere for each site
   B. That special user is running the required program.
I would be 90% happy if I could just confirm A, but following up with B would be great.

There are two ways I have considered attacking this.  The first is to query each server via WMI and get a list of running process/users and manipulate the list to check everything is as it should be.    If i can get a full list of users/processes I have no problems manipulating that, but my SQL/WQL and WMI knowledge is limiting and I'm not having much luck.

The second way I have considered is to use the Citrix API and query our farm for this information.  At the end of the day this is probably the better way as I can just query the whole farm at once rather than each server in turn.  

I'm happy to get either of these option working, I've just reached the point were I'm a little lost and need some help to get further.

I'm trying come up with a way using vb.net to enumerate a list of users and if possible associated processes.

The environment we are running is a
Question by:theoaks
  • 2
  • 2

Accepted Solution

LKaushal earned 2000 total points
ID: 30004366
There is a tool already available which might be helful for you --> http://support.citrix.com/article/ctx121653 

Author Comment

ID: 30060963
This defintely does what I need to do (ie list users and their processes), but it is unfortunately not quite what i need.

This is all part of a larger program I'm writing so I need to be able to do it programatically using VB.net. (and the source for that app doesn't seem to be available)

It does mean at least that what I want to do is possible wich is reassuring! ;)

Assisted Solution

LKaushal earned 2000 total points
ID: 30118694
you can try CDN Citrix website --> http://community.citrix.com/cdn

it usually have lots of scripts and good pointers to interact with different Citrix components.

Author Comment

ID: 31804610
Thanks guys.  I've had a bit of a play with MFCOM for citrix and it looks like it gives me some pretty good  functionality to enumerate all kinds of citrix stuff.

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Native ability to set a user account password via AD GPO was removed because the passwords can be easily decrypted by any authenticated user in the domain. Microsoft recommends LAPS as a replacement and I have written an article that does something …
The PowerShell Core 6.0 of .NET release is just the beginning. The upcoming PowerShell Core 6.1 would have artificial intelligence and internet of things capabilities. So many things to look forward to in the upcoming release.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question