Setting Up a SCOM Notification Channel to Launch a Powershell Script
For any subscription, there are three pieces that all must be configured correctly: the channel, subscriber, and subscription. Below is how I’ve set it up in my lab. The screenshots are from SCOM 2012 R2, but that mechanism is similar in SCOM 2007. For this example, I created a SCOM alert based on the detection of an event in the application log. The subscription looked for this alert and then via the notification channel used a powershell command to create an event in the application log.
Powershell script the notification will run:
Note: I confirmed file location and that it executes interactively
Channel – Command
Subscriber
The key here is I setup the channel for the user to be the custom channel (from above). Ideally, this channel will have a process/logical name instead of a user name since a user isn’t being emailed, paged, etc.
Subscription
Lastly, associate an event (in this case alert creation) with the subscriber and channel.