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

Windows Server Management
Windows Server Management
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Management: The act or process of organizing, handling, directing or controlling something.
423 questions
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
913 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenLiu-MSFT 41,131 Reputation points Microsoft Vendor
    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