Powershell notification command

I have created a group in scom with all the components of an application. When there is an alert on one of these components a notification is running with a command channel to call a powershell scripts. This script is accepting the alert-id, load the operationsmanager module and is changing the resolutionstate of the alert.
All this is working fine, but when we are getting many alerts on the same time for this group, there is a large delay in changing the resolution states.
How can we fix this?
Kind regards, Luc

Hi Luc,

Check your open alerts for a warning on your management servers called “Operations Manager failed to start a process due to lack of resources.”

By default, the management servers can only run a few scripts at a time. There is a registry value that can be changed to increase the number.

The registry key is: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global\Command Executer

The registry value is:
Name: AsyncProcessLimit
Type: DWORD (32-bit)
Base: Decimal

I set the value to 20 at first but later had to increase it to 40.

I have a command channel that calls a PowerShell script to put a server in maintenance mode for 10 minutes when a clean reboot is detected. The value had to be increased from 20 to 40 because the script wasn’t always running during maintenance windows when a lot of servers were rebooting.


Nice one Steve. I too have ran into this issue as well but happened so rarely I never bothered to look further into it.

@lucvb (and Steve) if you’re up to it, may want to give a look at this post from Kevin Holman Monitor an agent – but run response on a Management Server - Kevin Holman's Blog
Like this you would skip entirely the command channel…

Hi Steve, thanks for your answer.
I don’t have this registry key on my management server.
I have nothing under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global.
Do I have to create this key?

Hi Luc,

I don’t remember if it was there when I set up everything. In my notes, I wrote “If the Command Executer key doesn’t exist, create it.” I would guess that it’s probably not there by default on most or all installations. I also have a note to restart HealthService after adding everything.


If you do use the AsyncProcessLimit registry change, be sure to make this change on ALL of your management servers.

To make things easier, here is some PowerShell to do the heavy lifting:

# AsyncProcessLimit
$Value = "20"
$Key = "AsyncProcessLimit"
$Path = "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global\Command Executer"
$Type = "DWord"

# Create the path if it doesn't exist
IF (!(Test-Path $Path)) {
    New-Item -Path $Path -Force

# Create and set the key, if it doesn't exist
Set-ItemProperty -Name $Key -Path $Path -Value $Value -Type $Type

Hi everyone, thanks for all of your anwsers. I’ve added the registry key and it seems to be working fine. Thanks, Luc