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
{
param($EventID=”blank”,$Source)
If ($EventID -eq “blank”)
{
Write-Warning “USAGE: Find-Event [-EventID] [[-Source] ]”
}
Else
{
(New-Object -ComObject Shell.Application).Open(“http://www.eventid.net/display.asp?eventID=$EventID&source=$Source”)
}
}

»crosslinked«

No related posts.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

   
© 2012 PeetersOnline Suffusion theme by Sayontan Sinha