Blog
By Pete Zerger on 6/3/2009 5:52:13 AM • Rank (2438) • Views 2663
0

0

I was working with a custom runtime script the other day and received an ambiguous error message when I executed the script on my development workstation.

Error: Microsoft VBScript runtime error: Subscript out of range

Issue: The Event ID I was using was actually an invalid event number!

Workaround: The .LogScriptEvent method only accepts event IDs from 1 to 20000. 20001 and higher result in the error above.

Additional Reading

Incidentally, if you're developing custom runtime scripts for Operations? Manager and Essentials 2007 check out our Scripting Series, which includes several articles on writing monitoring scripts for OpsMgr. (I still need to put a discovery scripting sample together). Search the site for “Scripting Series” which should reveal all the posts and related downloads.

Comments - Comment RSS


Who Viewed
Who Reviewed
Categories
Related Pages
Shortened URL
http://tinyurl.com/y8swkdr

Top Contributors
Featured Members
Pete Zerger
Points: 72533
Level: System Center Expert
Tommy Gunn
Points: 47345
Level: System Center Expert
Simon Skinner
Points: 40804
Level: System Center Expert
Andreas Zuckerhut
Points: 30700
Level: System Center Expert
Stefan Koell
Points: 30179
Level: System Center Expert