Share via


New-SCSMAlertRule

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

Syntax

Class (Default)

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

ManagementPack

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

Custom

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

Computer

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

NoCriteria

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

Description

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

Examples

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

PS C:\>$rule = new-SCSMAlertRule @{

    Name = "newRule"

    Template = Get-SCSMObjectTemplate -name .*IncidentTemplate.*

    ManagementPack = Get-SCManagementPack -Name System.Library

    }

This command creates a new alert rule for an Operations Manager Alert connector.

Parameters

-Class

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Class
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComputerName

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.

Parameter properties

Type:

System.String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Credential

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.

Parameter properties

Type:System.Management.Automation.PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomField1

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomField10

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomField2

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomField3

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomField4

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomField5

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomField6

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomField7

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomField8

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomField9

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomOperator1

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

  • Equals
  • Contains

Parameter properties

Type:

System.Nullable`1[Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator]

Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomOperator10

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

  • Equals
  • Contains

Parameter properties

Type:

System.Nullable`1[Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator]

Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomOperator2

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

  • Equals
  • Contains

Parameter properties

Type:

System.Nullable`1[Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator]

Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomOperator3

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

  • Equals
  • Contains

Parameter properties

Type:

System.Nullable`1[Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator]

Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomOperator4

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

  • Equals
  • Contains

Parameter properties

Type:

System.Nullable`1[Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator]

Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomOperator5

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

  • Equals
  • Contains

Parameter properties

Type:

System.Nullable`1[Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator]

Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomOperator6

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

  • Equals
  • Contains

Parameter properties

Type:

System.Nullable`1[Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator]

Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomOperator7

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

  • Equals
  • Contains

Parameter properties

Type:

System.Nullable`1[Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator]

Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomOperator8

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

  • Equals
  • Contains

Parameter properties

Type:

System.Nullable`1[Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator]

Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CustomOperator9

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

  • Equals
  • Contains

Parameter properties

Type:

System.Nullable`1[Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator]

Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Custom
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Group

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Computer
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ManagementPack

Specifies the list of management packs.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ManagementPack
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the alert rule.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NoCriteria

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

NoCriteria
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Operator

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

  • Equals
  • Contains

Parameter properties

Type:Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.CompareOperator
Default value:None
Accepted values:Equals, Contains
Supports wildcards:False
DontShow:False

Parameter sets

Class
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ManagementPack
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Priority

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

  • Low
  • Medium
  • High

Parameter properties

Type:Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.Priority
Default value:None
Accepted values:Unspecified, Low, Medium, High
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SCSession

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

Parameter properties

Type:

Microsoft.SystemCenter.Core.Connection.Connection[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Severity

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

  • Low
  • Medium
  • High

Parameter properties

Type:Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.Severity
Default value:None
Accepted values:Unspecified, Information, Warning, Error
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Template

Specifies the template to apply to the rule.

Parameter properties

Type:Microsoft.EnterpriseManagement.Configuration.ManagementPackObjectTemplate
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None.

You cannot pipe input to this cmdlet.

Outputs

None.

Notes

  • This cmdlet does not generate any output.