There is a bunch of Windows Server 2008 R2 computers in the domain. They are used as workstations both for local and remote access. What is the right way to collect the information about logged on users? Including:
- Who are logged on locally (Session=Console in terms of Remote Desktop Services Manager)
- Who are logged on locally, but desktop is locked (State!=Active in terms of RDSM)
- Who are logged on remotely
- Who are logged on remotely, but desktop is locked
- Logged on time (if possible)
I'd like to compile an HTML page with the information, so it'll be great to work out a script to do the job.
Solutions that didn't work for me:
For example, the
PsLoggedOn utility (SysInternals) doesn't give information about the state (Active/Disconnected).
The Remote Desktop Services Manager is a great GUI tool, especially when added all the machines to the group. I need the same information via console interface.