New-SCSMAlertRule

New-SCSMAlertRule

Creates an alert rule to be used with an Operations Manager Alert connector in Service Manager.

構文

Parameter Set: Class
New-SCSMAlertRule [-Name] <String> -Class <String> -Operator <CompareOperator> -Template <ManagementPackObjectTemplate> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-Priority <Priority> ] [-SCSession <Connection[]> ] [-Severity <Severity> ] [ <CommonParameters>]

Parameter Set: Computer
New-SCSMAlertRule [-Name] <String> -Group <String> -Template <ManagementPackObjectTemplate> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-Priority <Priority> ] [-SCSession <Connection[]> ] [-Severity <Severity> ] [ <CommonParameters>]

Parameter Set: Custom
New-SCSMAlertRule [-Name] <String> -Template <ManagementPackObjectTemplate> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-CustomField1 <String> ] [-CustomField10 <String> ] [-CustomField2 <String> ] [-CustomField3 <String> ] [-CustomField4 <String> ] [-CustomField5 <String> ] [-CustomField6 <String> ] [-CustomField7 <String> ] [-CustomField8 <String> ] [-CustomField9 <String> ] [-CustomOperator1 <Nullable`1> ] [-CustomOperator10 <Nullable`1> ] [-CustomOperator2 <Nullable`1> ] [-CustomOperator3 <Nullable`1> ] [-CustomOperator4 <Nullable`1> ] [-CustomOperator5 <Nullable`1> ] [-CustomOperator6 <Nullable`1> ] [-CustomOperator7 <Nullable`1> ] [-CustomOperator8 <Nullable`1> ] [-CustomOperator9 <Nullable`1> ] [-Priority <Priority> ] [-SCSession <Connection[]> ] [-Severity <Severity> ] [ <CommonParameters>]

Parameter Set: ManagementPack
New-SCSMAlertRule [-Name] <String> -ManagementPack <String> -Operator <CompareOperator> -Template <ManagementPackObjectTemplate> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-Priority <Priority> ] [-SCSession <Connection[]> ] [-Severity <Severity> ] [ <CommonParameters>]

Parameter Set: NoCriteria
New-SCSMAlertRule [-Name] <String> -NoCriteria -Template <ManagementPackObjectTemplate> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-Priority <Priority> ] [-SCSession <Connection[]> ] [-Severity <Severity> ] [ <CommonParameters>]

詳細説明

The New-SCSMAlertRule cmdlet creates an alert rule to use with an Operations Manager Alert connector in Service Manager.

パラメーター

-Class<String>

Specifies an instance of the monitoring class for which the alert was raised.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ComputerName<String[]>

Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

true (ByValue)

ワイルドカード文字を許可する

false

-Credential<PSCredential>

Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

true (ByValue)

ワイルドカード文字を許可する

false

-CustomField1<String>

Specifies the value for CustomField1. If you specify a value for this parameter, then you must also specify a value for the CustomOperator1 parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomField2<String>

Specifies the value for CustomField2. If you specify a value for this parameter, then you must also specify a value for the CustomOperator2 parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomField3<String>

Specifies the value for CustomField3. If you specify a value for this parameter, then you must also specify a value for the CustomOperator3 parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomField4<String>

Specifies the value for CustomField4. If you specify a value for this parameter, then you must also specify a value for the CustomOperator4 parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomField5<String>

Specifies the value for CustomField5. If you specify a value for this parameter, then you must also specify a value for the CustomOperator5 parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomField6<String>

Specifies the value for CustomField6. If you specify a value for this parameter, then you must also specify a value for the CustomOperator6 parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomField7<String>

Specifies the value for CustomField7. If you specify a value for this parameter, then you must also specify a value for the CustomOperator7 parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomField8<String>

Specifies the value for CustomField8. If you specify a value for this parameter, then you must also specify a value for the CustomOperator8 parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomField9<String>

Specifies the value for CustomField9. If you specify a value for this parameter, then you must also specify a value for the CustomOperator9 parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomField10<String>

Specifies the value for CustomField10. If you specify a value for this parameter, then you must also specify a value for the CustomOperator10 parameter.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomOperator1<Nullable`1>

Specifies the operator to apply to CustomField1. If you specify this parameter, then you must also specify a value in the CustomField1 parameter. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomOperator10<Nullable`1>

Specifies the operator to apply to CustomField10. If you specify this parameter, then you must also specify a value in the CustomField10 parameter. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomOperator2<Nullable`1>

Specifies the operator to apply to CustomField2. If you specify this parameter, then you must also specify the CustomField2 parameter. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomOperator3<Nullable`1>

Specifies the operator to apply to CustomField3. If you specify this parameter, then you must also specify the CustomField3 parameter. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomOperator4<Nullable`1>

Specifies the operator to apply to CustomField4. If you specify this parameter, then you must also specify the CustomField4 parameter. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomOperator5<Nullable`1>

Specifies the operator to apply to CustomField5. If you specify this parameter, then you must also specify the CustomField5 parameter. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomOperator6<Nullable`1>

Specifies the operator to apply to CustomField6. If you specify this parameter, then you must also specify the CustomField6 parameter. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomOperator7<Nullable`1>

Specifies the operator to apply to CustomField7. If you specify this parameter, then you must also specify the CustomField7 parameter. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomOperator8<Nullable`1>

Specifies the operator to apply to CustomField8. If you specify this parameter, then you must also specify the CustomField8 parameter. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CustomOperator9<Nullable`1>

Specifies the operator to apply to CustomField9. If you specify this parameter, then you must also specify the CustomField9 parameter. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Group<String>

Specifies the name of the group that contains the computers to be associated with the alert rule.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ManagementPack<String>

Specifies the list of management packs.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Name<String>

Specifies the name of the alert rule.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-NoCriteria

Indicates that this cmdlet configures the alert rule to have no criteria.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Operator<CompareOperator>

Specifies the comparison operator to use in the alert rule. Valid values are:

-- Equals
-- Contains

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Priority<Priority>

Specifies the priority of the alert rule. Valid values are:

-- Low
-- Medium
-- High

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-SCSession<Connection[]>

Specifies an object that represents the session to a Service Manager management server.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

true (ByValue)

ワイルドカード文字を許可する

false

-Severity<Severity>

Specifies the severity of the alert rule. Valid values are:

-- Low
-- Medium
-- High

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Template<ManagementPackObjectTemplate>

Specifies the template to apply to the rule.

エイリアス

なし

必須?

true

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • None.

    You cannot pipe input to this cmdlet.

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • None.

  • This cmdlet does not generate any output.

Example 1: Create an alert rule for an Operations Manager Alert connector

The first command gets a template that matches the specified string by using the Get-SCSMObjectTemplate cmdlet. The command stores the result in the $Template variable.

The second command gets a management pack named System.Library by using the Get-SCSMManagementPack cmdlet. The command stores the result in the $ManagementPack variable.

The final command creates an alert rule for an Operations Manager Alert connector.

PS C:\>$Template = Get-SCSMObjectTemplate -Name ".*IncidentTemplate.*" 
PS C:\> $ManagementPack = Get-SCManagementPack -Name "System.Library"
PS C:\> $Rule = New-SCSMAlertRule -Name "AlertRule22" -ManagementPack -Template $Template

関連トピック

Get-SCSMManagementPack

Get-SCSMObjectTemplate