>>The code you described will return all users with an account on the server whether they are connected or not.
>
>Yes, it was mentioned with the code. Probably currently logged users can be found using LastLogon and LastLogoff properties. Do you know something better?
Actually, it is a lot more difficult than that. Login/Logoff information for a domain is not maintained at the PDC. The information is stored in the machine that processed the information. In order to get this information, you need to gather a list of all PDCs/BDCs and then poll each one to see which has the most up-to-date Login information. You would probably have to do the same to determine Logoff information.
It's a PITA to put it mildly. So no I don't have a better way.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao