Score:0

Scanning all Windows event log folders for an event in a given time interval

bd flag

When investigating a problem on a Windows client, I regularly find myself looking for relevant event log entries in a pretty well defined timeframe, but with no idea which of the myriad of folders in Windows Event Viewer on the involved client I should look at. Inspecting every one of these folders in turn typically shows that the majority of them is completely empty or at least does not contain any events in the time interval I am interested in.

Is there a quick way to find out which of the Windows event logs actually contain any entries in a given time interval?

anx avatar
fr flag
anx
Do you *care* which source contains the events you are looking at or *need* to use that prehistoric UI? (Try aggregated views, the [PowerShell interface](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-eventlog) or [Nir Sofers viewer](https://www.nirsoft.net/utils/full_event_log_view.html) for starters.)
Tilman Schmidt avatar
bd flag
No, I don't care which source contains the events, nor am I in love with the, as you say, prehistoric UI. I do however need to work with standard Windows tools as the problem typically arises on user/customer systems where I cannot start by installing third party tools, so the NirSoft viewer is in most cases not an option. The PowerShell interface you reference requires specifying the LogName to inspect so it doesn't help.
in flag
If you can't install 3rd party tools then you're automatically limiting yourself quite a bit since Windows doesn't really offer a lot of options other than scripting. Why don't you first enumerate all the available logs and then query them? PowerShell is pretty much going to be your only option. Happy to see if I can come up with a code example if that sounds good.
Tilman Schmidt avatar
bd flag
That avenue sounds promising. A code example to get me started would be most welcome.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.