We would like to build a simple program that lists users that are logged into the machine and by selecting the item on the list, we want to kill (log off) the session.
Could you please help in
1. code to get list of active session
2. code to log off the specific session (possibly by seeding ID from the #1 above)
(This is somewhat like what we can do from the Task Manager by selecting the user session and "Sign off")