Link to home
Start Free TrialLog in
Avatar of Mike_Schnobrich
Mike_SchnobrichFlag for United States of America

asked on

How to get a list of logged on users on MS Small Business Server

Hi,

I am currently writing an application in C# that needs to know who is logged on to the server (MS SBS) I have been looking around for a while now and I can get a list of all the users on the network without much of a problem but I need to get a list of the logged on users. Is there an easy way to do this through WMI and how do I go about it?
Avatar of bluetab
bluetab

I don't know much/anything about WMI but you can tell who's logged in by looking at the sessions by going to:
Server Management | Advanced Management | Computer Management (Local) | System Tools | Shared Folder Sessions
Avatar of Jeffrey Kane - TechSoEasy
Being "logged on" is something that's not a constantly monitered situation because of Kerberos authenticatioin.  Once a user is AUTHENTICATED on a domain, they have a ticket granted from Kerberos that permits them to use the domain's resources until the ticket expires.  What that means is that a user might be logged into the network, but not really to the server itself.

Can you explain what the application does?  Because if it's just to see who's "online" you can use Windows Messenger because an IM client will stay "logged on" to a server.

Jeff
TechSoEasy
Avatar of Mike_Schnobrich

ASKER

I am building an application that will run on one or more clients and part of what it does is show who is all currently logged on. I looked at one possible solution where when the application starts up, it tells the server its present and the server than sends it a list of who is logged on and then tells all the other instances that it has logged on. The problem with that solution is what happens if someone is logged on to the server working in say SharePoint but not using the application. It would be better to track who is logged on independent of any particular application. Then, any application that needs the information can access it as needed.

Is that possible?
Looking at the sessions folder pointed out by bluetab is what I am after, how do I access that pragmatically using C#.
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Kane - TechSoEasy
Jeffrey Kane - TechSoEasy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, one other way to do this would be through the Office Live Communications Server API:
http://msdn2.microsoft.com/en-us/library/aa644830

Jeff
TechSoEasy
Forced accept.

Computer101
EE Admin