Share via


New-SCOMAlertConnector

Creates a new Operations Manager alert connector in Service Manager.

Syntax

Default (Default)

New-SCOMAlertConnector
    [-CloseAlert]
    [[-Description] <String>]
    [-Enable <Boolean>]
    [-DisplayName] <String>
    -OperationsManagerServer <String>
    [-PassThru]
    [-ResolveIncident]
    [-Rules <AlertRule[]>]
    [-RunAsAccount <ManagementPackSecureReference>]
    [-PollIntervalInSeconds <Int32>]
    [-Template <ManagementPackObjectTemplate>]
    [-SyncNow]
    -SCOMCredential <PSCredential>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The New-SCOMAlertConnector cmdlet creates an Operations Manager alert connector in Service Manager.

Examples

Example 1: Create an Operations Manager alert connector

PS C:\>$RunAsAccount = Get-SCSMRunAsAccount -UserName "AdminRA"
PS C:\> $Credential = Get-Credential
PS C:\> New-SCOMAlertConnector -DisplayName "SCOM ALERT CONNECTOR" -OperationsManagerServer "server.contoso.com" -SCOMCredential $Credential -RunAsAccount $RunAsAccount

The first command gets a Run As account for AdminRA by using the Get-SCSMRunAsAccount cmdlet. The command stores the result in the $RunAsAccount variable.

The second command prompts you for credentials by using the Get-Credential cmdlet, and then stores the credentials in the $Credential variable.

The final command creates an Operations Manager alert connector which has no rules, and which uses a default template.

Parameters

-CloseAlert

Specifies that Operations Manager closes alerts after they are resolved or closed in Service Manager.

Parameter properties

Type:System.Management.Automation.SwitchParameter
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

-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:Localhost
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

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

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

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

-Description

Specifies a description for the connector.

Parameter properties

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

Parameter sets

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

-DisplayName

Specifies the name of the connector.

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

-Enable

Indicates whether this cmdlet enables or disables the connector.

Parameter properties

Type:System.Boolean
Default value:True
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

-OperationsManagerServer

Specifies the name of the Operations Manager server.

Parameter properties

Type:System.String
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

-PassThru

Indicates that this cmdlet returns the Operations Manager alert connector that it creates. You can pass this object to other cmdlets.

Parameter properties

Type:System.Management.Automation.SwitchParameter
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

-PollIntervalInSeconds

Specifies the polling interval, in seconds, for the Operations Manager alert connector.

Parameter properties

Type:System.Int32
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

-ResolveIncident

Specifies that this cmdlet configures Service Manager to automatically resolve incidents after Operations Manager closes the associated alert.

Parameter properties

Type:System.Management.Automation.SwitchParameter
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

-Rules

Specifies the rules which provide routing instructions for the alerts. The rules which provide routing instructions for the alerts.

Parameter properties

Type:

Microsoft.EnterpriseManagement.ServiceManager.Connectors.OpsMgr.AlertRule[]

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

-RunAsAccount

Specifies the Run As account to use during connector synchronization.

Parameter properties

Type:Microsoft.EnterpriseManagement.Configuration.ManagementPackSecureReference
Default value:Operational System Account
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

-SCOMCredential

Specifies the credential to use when connecting to Operations Manager.

Parameter properties

Type:System.Management.Automation.PSCredential
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

-SCSession

Specifies an object that represents a 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

-SyncNow

Starts a synchronization of the Operations Manager alert connector.

Parameter properties

Type:System.Management.Automation.SwitchParameter
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

-Template

Specifies the default template to use when an alert does not match a rule.

Parameter properties

Type:Microsoft.EnterpriseManagement.Configuration.ManagementPackObjectTemplate
Default value:Operations Manager Incident Template
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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
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.

This cmdlet does not generate any output.