Power Shell 指令碼已捨棄警示

Microsoft.SystemCenter.PowerShellModule.AlertOnDroppedResponses (Rule)

在捨棄 Power Shell 指令碼時發出警示。

Knowledge Base article:

摘要

由於過度使用,System Center 管理健全狀況服務無法隨規則或監視執行 PowerShell 指令碼。

這可能會影響到某些監視或目錄。

原因

這可能是由以下原因所造成:

解決方式

警示描述和內容會提供資訊指出失敗的規則或監視。 然而,也可能有其他規則或監視失敗。 以下連結將顯示指出執行檔執行失敗的所有事件:

檢視 PowerShell 事件

檢閱內容中的錯誤後,請考慮減少 PowerShell 指令碼的頻率。

確定電腦未過度使用。

若排定過多 PowerShell 指令碼,也可能造成此問題。 可能是由於事件暴增或計時器設定不當所導致。 無論是哪種情況都必須檢查規則設定,以判定為何 PowerShell 指令碼太過經常執行,且通常需要進行一些恢復 (增加間隔)。

Element properties:

TargetMicrosoft.SystemCenter.HealthService
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
Power Shell 指令碼已捨棄
{0}
Event LogOperations Manager

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
Consolidator ConditionDetection System.ConsolidatorCondition Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SystemCenter.PowerShellModule.AlertOnDroppedResponses" Enabled="true" Target="SCLibrary!Microsoft.SystemCenter.HealthService" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Operations Manager</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Health Service Modules</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/ManagementGroup/Name$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">22411</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<ConditionDetection ID="Consolidator" TypeID="System!System.ConsolidatorCondition">
<Consolidator>
<ConsolidationProperties>
<PropertyXPathQuery>Params/Param[1]</PropertyXPathQuery>
</ConsolidationProperties>
<TimeControl>
<WithinTimeSchedule>
<Interval>300</Interval>
</WithinTimeSchedule>
</TimeControl>
<CountingCondition>
<Count>10</Count>
<CountMode>OnNewItemTestOutputRestart_OnTimerSlideByOne</CountMode>
</CountingCondition>
</Consolidator>
</ConditionDetection>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertName/>
<AlertMessageId>$MPElement[Name="Microsoft.SystemCenter.PowerShellModule.AlertOnDroppedResponses.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/Context/DataItem/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/Context/DataItem/Params/Param[2]$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>