SCOM 2007: LogScriptEvent fails for large event ID-s?

I wonder if this problem is documented somewhere, and if that’s really a problem or just my perception. Anyway, I just ran into this issue while working on a vbs script for a management pack.

It seems that LogScriptEvent API method fails for all event ID-s larger than 20000. For instance, this code will fail with “invalid argument” exception:

Dim oAPI : Set oAPI = CreateObject(“MOM.ScriptAPI”)
Call oAPI.LogScriptEvent(“TreeCat.vbs”, 20001, 1, “Started”)

And this one will work:

Dim oAPI : Set oAPI = CreateObject(“MOM.ScriptAPI”)
Call oAPI.LogScriptEvent(“TreeCat.vbs”, 20000, 1, “Started”)

From what I can say, it looks like a hard coded limitation of SCOM API.

This entry was posted in Operations Manager, Twitted. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

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>