PowerShell スナップイン読み込み失敗のアラート

Microsoft.SystemCenter.PowerShellModule.AlertOnFailedLoadSnapIn (Rule)

ルールまたはモニターが PowerShell スクリプトを実行しようとしたときに、PowerShell スナップインを読み込めなかった場合にアラートを生成します。

Knowledge Base article:

概要

System Center Management ヘルス サービスが PowerShell スクリプトを実行しようとしましたが、PowerShell スナップインを読み込めませんでした。

これは、監視または検出に影響を与える可能性があります。

原因

これは次のような事項が原因で発生します。

解決策

アラートの説明およびコンテキストには、失敗したルールまたはモニターを示す情報が含まれます。 次のリンクから、PowerShell スクリプト実行の失敗を示すすべてのイベントを表示できます。

PowerShell イベントの表示

コンテキストでエラーを確認したら、次のことをチェックしてください。

ワークフローの構成にあるスナップインの名前の綴りが正しい。

スナップインとその依存コンポーネントがコンピューターに正しくインストールされている。

最後に、アクション アカウントがスナップインへの十分なアクセス許可を持っているかどうかを確認します。

Element properties:

TargetMicrosoft.SystemCenter.HealthService
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
PowerShell スナップインを読み込めませんでした
{0}
Event LogOperations Manager

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SystemCenter.PowerShellModule.AlertOnFailedLoadSnapIn" 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">22401</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.SystemCenter.PowerShellModule.AlertOnFailedLoadSnapIn.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/Params/Param[7]$</SuppressionValue>
<SuppressionValue>$Data/Params/Param[8]$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>