V
V
Vladimir Borovik2016-06-13 16:39:19
C++ / C#
Vladimir Borovik, 2016-06-13 16:39:19

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

1 answer(s)
M
mark1yan, 2016-06-13
@mark1yan

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 question

Ask a Question

731 491 924 answers to any question