title: How to find what user last logged onto a given computer through Active Directory in C#?
body: <p>I am trying to programmatically find who last logged onto a given computer and when with C#. Given the name of a computer as a string, I have learned about <a href="https://stackoverflow.com/questions/19454162/getting-last-logon-time-on-computers-in-active-directory">Getting last Logon Time on Computers in Active Directory</a>. However, there doesn't seem to be a property for which user was the one that actually logged in. Do I have to take a different approach for this? Anything I found online that was remotely related to this was in VBScript, but this must be done in C#.</p>