Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi every one,


In windows security event log has many logon(4624) and logoff(4625) events. How to get the users original log on and its log off events. Please any one help me


Thanks in advance
Posted
Updated 24-Sep-14 3:44am
v2
Comments
ZurdoDev 24-Sep-14 9:45am    
Do you mean through C#? Where are you stuck?
Prasad Avunoori 24-Sep-14 10:27am    
What are you trying to do? Elaborate more.
gggustafson 24-Sep-14 14:53pm    
Use EventLog.Entries to retrieve the current contents of the log. Then use some algorithm to obtain the data you are interested in.
robow3 25-Sep-14 1:45am    
thanks for quick reply.

i'm trying to get user's logon and logoff time from the event viewer. And also trying to get the user working time.
So first i'm enable the audit log first. Then clear all audit log. Now i'm login from network machine as a domain user or a local user in my server. More than 15 to 60 logs for this single login in event viewer.
In this logs, login event(4624) is more than 5 to 20. Now how can trim and get original login event. I already try with login id and logon guid of logon event parameter. But its also gives more
events. So i could not get the correct logon and logoff time of the user. I strike more than a week in this problem.

1 solution

Thanks to all your reply

Here i get related answer. Thanks again
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900