question

LusArmandoRodrigues-0207 avatar image
0 Votes"
LusArmandoRodrigues-0207 asked CyrAz commented

How To Create rules into SCOM from Script or PowerShell or anything else...

Hi...
I need to create a batch of rules into SCOM, like 100 rules into SCOM.
The rules are event ID-based, so there's an event been written for alerting and clearing....

But I can't seem to find anything on this subject...

It seems like there's no way to create multiple alert rules into SCOM at once based on EVENTID...

Can please someone Help or shed some light...

Thanks in advance.

msc-operations-manager
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CyrAz avatar image
0 Votes"
CyrAz answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlexZhu-MSFT avatar image
0 Votes"
AlexZhu-MSFT answered CyrAz commented

Hi,

If our purpose is to generate an alert for any of the 100+ Event ID, perhaps we may consider to create only a single monitor/rule based on the script. In the script, we can detect any of the occurrence of the Event IDs specified, return the variables we want to collect (via propertybag), as well as the Event ID if necessary.

In the script, we may perform any operations required. Here's a sample to calculate the file count, just for your reference.

111284-scom-ps-script-based-monitor-03.png

Alex
If the response is helpful, please click "Accept Answer" and upvote it.



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Scripted monitors are not so great for event monitoring, as they won't trap new events "in real time" contrary to the native event datasource

1 Vote 1 ·