How can SCCM execute a script when an alert becomes active?

norbq98 0 Reputation points
2023-09-21T18:44:47.7766667+00:00

Hello,

How can SCCM execute a script when an alert becomes active? Using WMI, the SMS_InstanceChangeNotification allows me to see events related to the SCCM GUI changing alert parameters, but it doesn't seem to do anything when the alert becomes active.

Specifically, I have a configuration baseline where I'm trying to perform an action when the baseline drops out of compliance. I'm currently attempting to use WMI and Status Filter Rules. My current status filter rule is on the component: "SMS_ALERT_NOTIFICATION", but I need to verify that it's working.

Here are my compliance alerts where I want to execute a script/executable as well as the status filter rules:status_filter_rule_general

status_filter_rule_action

compliance

Microsoft Security | Intune | Configuration Manager | Deployment
Microsoft Security | Intune | Configuration Manager | Other
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenLiu-MSFT 49,316 Reputation points Microsoft External Staff
    2023-09-22T07:31:38.2033333+00:00

    Hi, @norbq98

    Thank you for posting in Microsoft Q&A forum.

    To execute a script when an alert becomes active in SCCM, you can create a Status Filter Rule that triggers the script when the alert is raised. The Status Filter Rule should be created on the component "SMS_ALERT_NOTIFICATION". You can verify that the rule is working by checking the SMS_StatusMessage WMI class.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.