PS: Querying Event Viewer made easy

List all error events since a specified date in the past:

Set a variable to a date that you want to see all error events after that:

PS C:> $today = get-date 2/15/11
PS C:> get-eventlog -logname application -Source "*error*" -after $today | ft -auto

Index Time         EntryType   Source                  InstanceID Message
—– —-         ———   ——                  ———- ——-
9783 Mar 13 10:42 Information Windows Error Reporting       1001 Fault bucket , type 0…
9594 Mar 07 00:08 Information Windows Error Reporting       1001 Fault bucket , type 0…
9272 Mar 06 19:34 Information Windows Error Reporting       1001 Fault bucket , type 0…
9271 Mar 06 19:34 Error       Application Error             1000 Faulting application name: Explorer.EXE, version: …
9266 Mar 06 19:24 Information Windows Error Reporting       1001 Fault bucket , type 0…
9265 Mar 06 19:24 Error       Application Error             1000 Faulting application name: PowerScreenCapture.exe,…
9120 Feb 28 14:25 Error       Application Error             1000 Faulting application name: vlc.exe, version: 1.1.5…
9114 Feb 27 16:29 Information Windows Error Reporting       1001 Fault bucket , type 0…
8816 Feb 16 00:15 Error       Application Error             1000 Faulting application name: googleearth.exe, versio…
8794 Feb 15 11:29 Information Windows Error Reporting       1001 Fault bucket , type 0…

PS C:>

Leave a Reply

Your email address will not be published. Required fields are marked *