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.
Creating an engaging and informative online quiz or assessment can be a powerful tool for… Read More
Work-related stress is a common issue in the hospitality industry, where employees often face long… Read More
In a leadership position, assertiveness and effective communication skills are crucial for success. Being able… Read More
Employee recognition and rewards programs play a crucial role in motivating and engaging employees, as… Read More
Customer feedback and online reviews play a crucial role in shaping a company's reputation and… Read More
Effective time management is crucial for stay-at-home parents who juggle multiple responsibilities on a daily… Read More