Thursday, November 19, 2015

OpsMgr warning: Power Shell script was dropped (solved)

Recently I did some OpsMgr troubleshooting. This in an environment with lot of agents and management packs installed. On multiple Hyper-V hosts there is a recurring OpsMgr warning seen: Power Shell script was dropped. I did a lot to try solve the issue, but despite the activities, it didn't do the job. Hope to found a solution on this, so therefore this blogpost.
Let's have a look at Product Knowledge first:
The System Center Management Health Service could not run a PowerShell script as part of a rule or monitor due to over utilization.

This may affect some monitoring or discovery.
This can be caused by:
-Too many PowerShell scripts being run by the System Center Management Health Service.
-PowerShell scripts are taking too long to execute.
-PowerShell scripts are running too frequently.
-The computer does not have enough resources (for example; memory) to run the PowerShell script.

The alert description and context has information indicating which rule or monitor failed. However, there may be other rules or monitors failing as well. The following link will display all events indicating a failure to run the executable:

After reviewing the error in the context, consider reducing the frequency of the PowerShell script.
Ensure that the computer is not over utilized.
-Check Task Manager to see if there is enough free memory.
-Check Task Manager to see if there are any processes consuming all the CPU.

This can also be caused when too many PowerShell scripts are being scheduled. This could be the result of an event storm or a misconfigured timer. In both cases the rule configuration will have to be examined to determine why the PowerShell script is running too often and usually will need to be backed down somehow (increasing the interval).

Let's have a look at Event Viewer now:
Workflow names (there are more):



Script names (there are more):
CheckMaxConcurrentAPI.ps1, ClusterVMState.ps1
GetDiskPartitionSpaceV2.ps1, GetVPortPerfData (a lot)

SummaryInfo.ps1, UsedStorageV3.ps1
All errors seen here has Event ID 22411 and Source Health Service Modules. They will be generated every 30 minutes again.

Easy solution could be to stop rule alerts, so that no warnings on Dropped Power Shell script would be displayed anymore. But that doesn't take away the thousand of errors on any Hyper-V host seen. I did look at the following websites for more information too. Hope anyone can point me in the right direction on this. Thanks!
Websites visited:
ReSearch This KB – Power Shell script was dropped
What does powershell script 'GetVPortPerfData' do in SCOM?
Powershell Script to "Disable/Enable" Subscriptions
OpsMgr 2012 Self Maintenance Management Pack Update
SCOM: powershell run space failed to start

Update: Based on the website from Reidar Johansen I followed the steps to disable both Virtual Port errors. After that no new events were logged on Hyper-V anymore and no new warnings were created in OpsMgr. Start the command: Get-SCOMRule -Name Microsoft.SystemCenter.VirtualMachineManager.Network.2012.Vport.* and disable the rules DisplayName: [Virtual port received bytes per second] and [Virtual port sent Bytes per second] and you will be fine. Hope it helps!

No comments:

Post a Comment