Alerta em caso de Falha no Carregamento de um SnapIn de Power Shell

Microsoft.SystemCenter.PowerShellModule.AlertOnFailedLoadSnapIn (Rule)

Alerta quando uma regra ou monitor tenta executar um script de Power Shell e não pode ser carregado um snap-in de Power Shell.

Knowledge Base article:

Resumo

O Serviço de Integridade de Gestão do System Center estava a tentar executar um script do PowerShell e não conseguiu carregar um Snap-In do PowerShell.

Tal pode afetar alguma monitorização ou deteção.

Causas

Tal pode dever-se a:

Resoluções

A descrição do alerta e o contexto têm informações que indicam qual a regra ou monitor que falhou. A hiperligação que se segue vai apresentar todos os eventos que indiquem uma falha ao executar o script do PowerShell:

Ver Eventos PowerShell

Depois de rever o erro no contexto, verifique:

Se o nome do Snap-In está escrito corretamente na configuração do fluxo de trabalho.

Se o Snap-In e as respetivas dependências estão instalados corretamente no computador.

Por último, deve verificar se a conta de ação possui um acesso suficiente para executar o Snap-In.

Element properties:

TargetMicrosoft.SystemCenter.HealthService
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
Não Foi Possível Carregar o SnapIn de Power Shell
{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>