Thursday 19 July 2012

LttP: Powershell Games 2012 - Beginner Event 9

Here's my entry for Beginner Event 9:

Get-EventLog -LogName Application -EntryType "Information" -InstanceId 10001 -Source "Microsoft-Windows-Winsrv" | Format-Table -Property "TimeGenerated","ReplacementStrings" -AutoSize

I'm pretty confident that I'm there, as it's as filtered as possible without restricting to a given application that causes the error.

I did have to follow the tip in the comments about how to create the item in the log and admittenly I was pretty frustrated with this one up to that point.  Then using the "Details" part of the Event Viewer GUI helped me find the "proper" source name.

Anyway, time to see the expert commentary.

No comments: