New-SCSMAlertRule

New-SCSMAlertRule

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

Syntax

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>]




Detailed Description

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

Parameters

-Class<String>

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Group<String>

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ManagementPack<String>

Specifies the list of management packs.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the alert rule.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NoCriteria

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Operator<CompareOperator>

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

-- Equals
-- Contains


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Priority<Priority>

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

-- Low
-- Medium
-- High


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SCSession<Connection[]>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Severity<Severity>

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

-- Low
-- Medium
-- High


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Template<ManagementPackObjectTemplate>

Specifies the template to apply to the rule.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.

    You cannot pipe input to this cmdlet.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • None.

Notes

  • This cmdlet does not generate any output.

Examples

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

Related topics

Community Additions

ADD
Show: