How to filter all events of a user from windows server 2008 event logs? | Advance event log filtering

Today for a little investigation I wanted to find all the logged events of a particular user in my windows active directory domain. I tried the basic log filtering option but it could not give me the logs I require so I wanted a way to find all the logs for a user.

To do this I used the xml query feature of event viewer. Believe me it is a amazing tool guys you can find anything you want from the active directory if you know the way query the ad.

First of all you need to open the event viewer.

Right click on the Custom View folder and select Create Custom View.

In the popup windows switch to the XML tab and then tick the bottom check box as depicted below.

Here you need to write the query to obtain required events from the log file. Here I have mentioned the query set to obtain all the details about a particular user. Don’t worry below I will give you a tip to easily write this query.

<QueryList>
  <Query Id=”0″ Path=”Security”>
    <Select Path=”Security”>
*[EventData[Data[@Name=’TargetUserName’] and (Data=’Randika’)]]
   </Select>
  </Query>
</QueryList>

Now click OK and on the next popped up window give a name and location for save the report.

Now inside your selected location in my case Custom Views you can see your newly created event filter profile.

It is easy except writing the query isn’t it?. You might wonder how I know the way to request the data.

It is easy guys first you need to select a similar event type and then go to the property of that event. Then switch to the Details tab and then select the XML radio button. Here you can see all the XML data names you just need to change the Name=’xyz’ xyz part with the data definition name and the data with the Data=’ ‘.

If you want any further explanation about my guide please ask them in the comment area.  

Hope this helped.

Recent Posts

How do I create an engaging and informative online quiz or assessment?

Creating an engaging and informative online quiz or assessment can be a powerful tool for… Read More

8 months ago

What are the most effective methods for managing and reducing work-related stress in the hospitality industry?

Work-related stress is a common issue in the hospitality industry, where employees often face long… Read More

8 months ago

How can I improve my assertiveness and communication skills in a leadership position?

In a leadership position, assertiveness and effective communication skills are crucial for success. Being able… Read More

8 months ago

What are the key elements of a successful employee recognition and rewards program?

Employee recognition and rewards programs play a crucial role in motivating and engaging employees, as… Read More

8 months ago

How do I effectively manage and respond to customer feedback and reviews?

Customer feedback and online reviews play a crucial role in shaping a company's reputation and… Read More

8 months ago

What are the best strategies for effective time management as a stay-at-home parent?

Effective time management is crucial for stay-at-home parents who juggle multiple responsibilities on a daily… Read More

8 months ago