Windows 2008 Active Directory – How to get the list of logged in user into the domain

active-directorywindows-server-2008

I need a program/tool capable of periodically report the users logged in into the domain controlled by a Windows 2008 AD Server.
A solution without periodically checking is also OK, because it's easy to run something scheduled.
Also, I would prefer some command line tool, so I can write a script to wrap it's output and send it to another machine.

PS: I am only interested in built-in or free tools.

Thanks a lot.

Best Answer

Active Directory domains don't maintain 'session state', it's just a directory, you won't be able to retrieve a list of logged in users.

You can get the last login date of each user but would require a script to check every domain controller in your domain (script link).