SCOM Notification Channel not executing Powershell script

spratshell 1 Reputation point
2021-04-07T14:25:00.183+00:00

We have a SCOM Command Notification channel that executes a
powershell script to send notifications to contacts.

This worked fine until we experienced some network issues and now
the script is not getting executed.

We can manually start the script on the SCOM server with no problems.
When an alert gets generated, however, the script is not getting executed.

The parameters on the channel look like this:

Full Path of the command file:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Command line parameters:
-command D:\Scripts\Operational\Live\NotifyScript.ps1 '$Data/Context/DataItem/AlertId$' '$MPElement$'
Startup folder for the command line:
D:\Scripts\Operational\Live\

![83314-image.png]1

We have restarted the SCOM servers, but nothing changed.

Without log information from the channels, there doesn't seem to be any
way to troubleshoot.

Can someone help us figure out what else we can look at or try please?

Thanks so much!

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,412 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,353 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SChalakov 10,261 Reputation points MVP
    2021-04-07T14:56:11.06+00:00

    Hi,

    had a similar case recently. If you have more than one management server, please make sure you have the same folder structure and the script in the folder on all of the management servers (part of the All Management Servers Ressource Pool). Try again aftewards!

    If you have done this already, please filter the Operations Manager Event Logs on all your Mgmt Servers and look for a related event, there should certainly be one out there. Wjhat does it say?

    Please also try setting up the Execution Policy to Unrestricted as in this example:

    Send SCOM Alerts to Slack
    https://www.cookdown.com/blog/send-scom-alerts-to-slack

    How does it look like, please share a short status update!


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Stoyan

    1 person found this answer helpful.