Powershell function to find event log explanations

Today I am attending the Dutch VMware User Group (VMUG) Meeting. No doubt I’ll return with lost of inspiration for new Powershell VI Toolkit scripts.
In the meantime, I will show you a nifty little function that will come in handy if you are troubleshooting Windows Server Event Log errors and / or warings. The usage is super-simple:

Find-Event EventID [Source]
For example: Find-Event 18056
Or: Find-Event 1 MSSQLServer

What it does? Give it a go (it’s harmless)… 😉

Here’s the code:

Function Find-Event
If ($EventID -eq “blank”)
Write-Warning “USAGE: Find-Event [-EventID] [[-Source] ]”
(New-Object -ComObject Shell.Application).Open(“http://www.eventid.net/display.asp?eventID=$EventID&source=$Source”)

Leave a Reply