Answer the question
In order to leave comments, you need to log in
How to programmatically find out the last login time of a user in a Windows system?
How to programmatically find out the last login time of a user in a Windows system?
The presence of additional software (including Power Shell) and libraries is not guaranteed.
Answer the question
In order to leave comments, you need to log in
net user /domain | findstr /B /C:"Last logon"
or view the event log,
How can I: Access Windows® Event Viewer?
1. Press Win+ R and type “eventvwr.msc” and click OK or press Enter.
2. Expand Windows Logs, and select Security.
3. In the middle you’ll see a list, with Date and Time,Source, Event ID
and Task Category. The Task Category pretty much explains the event,
Logon, Special Logon, Logoff and other details
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question