How can I get a list of usernames and their activity times on a remote machine, using C#?
For example, if there is a Windows machine named \'ABC-PC\' and there are c
This query give to you all the logged users
ManagementObjectSearcher query= new ManagementObjectSearcher("SELECT * FROM Win32_UserProfile WHERE Loaded = True");
You also have other parameters like LastUseTime into Win32_UserProfile
LastUseTime