The PowerShell script will be dropped because the it has been waiting in the queue for more than 10 minutes RRS feed

  • Question

  • Hi,

    I have created a new management pack with a single discovery and a single monitor. The discovery finds my components (around 100) and the monitor works initially. However, after a couple of hours I start getting this error in the event log:

    The PowerShell script will be dropped because the it has been waiting in the queue for more than 10 minutes.

    Script Name: MonitorItem.ps1

    One or more workflows were affected by this. 

    The script is very simple of takes 1-2 seconds when running manually. I have changes registry keys so the script shouldn't be dropped after 10 minutes. But doing this will simply make it drop after 30, 60 or 120 minutes, depending on the value in QueueMinutes. If I bounce the Health Service it returns to normal, but then I get the error after a few hours. My questions are:

    1. Why does it drop the script? This agent does literally nothing else. 

    2. What queue is this? I assume its the health service queue, but I have also tried changing the maximumQueueSizeKb without result

    I have the management pack running elsewhere, where it works fine, so this is an issue limited to a specific installation.


    Tuesday, January 20, 2015 8:56 AM

All replies

  • Hi,

    As you can see from the theory this alert could mean two things:

    1. Too many powershell scripts are executed on agent simultaneously

    2. There are scripts that takes much time to complete

    First of all, you need to evaluate a script-based module (workflow). You need to find answers to following questions:

    – What is the target for this script-based workflow?
    – How many instances of this target class are exist on the affected computer?
    – Does this script leveraging a cookdown concept?
    – How long it take for script to complete?

    Please go through the articles below for more details:


    In addition, here is a similar thread for your reference:

    Threshold for SCOM 2012                                 



    Yan Li

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, January 21, 2015 7:36 AM
  • 1. As I wrote, the agent does nothing else. This script is the only script running, besides scripts in the OS MP.

    2. As I wrote, the script takes 1-2 seconds to execute manually

    The monitor is targeted to a single Windows Server.

    The articles you mention:

    As I wrote, I have tried changing the registry settings to allow a bigger queue, without result. Cookdown is not possible - bear in mind that this is a SINGLE 10 lined script running on ONE agent, which has absolutely no roles.


    Friday, January 23, 2015 8:14 AM