Thank you! I did use a PowerShell script to grab all Event IDs across our servers to try and get all the ones that are regularly used. But you are correct, I will not be triggering solely off the Event ID. I was just bouncing ideas around for standardizing success/failure outputs for various applications so our Ops and/or Admins could eventually have an understanding of an alert based off the Event ID. But it's all in its infancy, so for now I'm working on some things that are just for me, and see how they might scale. Thanks for doing the webcast back in August for Silect, that is where I was introduced to the concept.
...and I'll work on my clearly inferior MSDN search skills. Thanks, Geoff From: [email protected] [mailto:[email protected]] On Behalf Of Kevin Holman Sent: Thursday, January 21, 2016 10:19 AM To: [email protected] Subject: [msmom] RE: Script Logging to Event Viewer https://msdn.microsoft.com/en-us/library/bb437630.aspx Parameter Type Description bstrScriptName String The name of the current script. wEventID Number The event ID of the log entry. Any integer value from 0 to 20000. wSeverity Number The severity type of the log entry. For details, see the Remarks section later in this topic. bstrDescription String The description of the event. You can use whatever you want. Only caveat is you MIGHT create events that other MP's also use - and they MIGHT generate alerts if there are rules looking for those events and they were so poorly written that they only trigger off the Event ID. :) I usually just make some up wherever I feel like that day. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Orlebeck, Geoffrey Sent: Thursday, January 21, 2016 11:08 AM To: '[email protected]' <[email protected]<mailto:[email protected]>> Subject: [msmom] Script Logging to Event Viewer All: A few months back I was on a webcast Kevin Holman did about MP authoring. One of many things I became aware of that day was using the 'MOM.ScriptAPI' to log to the Operations Manager Event Viewer log: $api = new-object -comObject 'MOM.ScriptAPI' $api.LogScriptEvent("<Script_Name>",<EventID>,<Level>,"<Description/Detail>") Is there any documentation on acceptable Event IDs? Or is there a known range the Operations Manager log does/doesn't accept from the API? I tried a Google search and poking around MSDN but didn't find anything. Thanks. -Geoff Confidentiality Notice: This is a transmission from Community Hospital of the Monterey Peninsula. This message and any attached documents may be confidential and contain information protected by state and federal medical privacy statutes. They are intended only for the use of the addressee. If you are not the intended recipient, any disclosure, copying, or distribution of this information is strictly prohibited. If you received this transmission in error, please accept our apologies and notify the sender. Thank you. Confidentiality Notice: This is a transmission from Community Hospital of the Monterey Peninsula. This message and any attached documents may be confidential and contain information protected by state and federal medical privacy statutes. They are intended only for the use of the addressee. If you are not the intended recipient, any disclosure, copying, or distribution of this information is strictly prohibited. If you received this transmission in error, please accept our apologies and notify the sender. Thank you.
