New-SCOMAlertConnector

Creates an Operations Manager alert connector in Service Manager.

Syntax

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:String[]
Required:False
Position:Named
Default value:Localhost
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:PSCredential
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the connector.

Type:String
Required:False
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

Specifies the name of the connector.

Type:String
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Enable

Indicates whether this cmdlet enables or disables the connector.

Type:Boolean
Required:False
Position:Named
Default value:True
Accept pipeline input:False
Accept wildcard characters:False
-OperationsManagerServer

Specifies the name of the Operations Manager server.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PollIntervalInSeconds

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

Type:Int32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResolveIncident

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

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Rules

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

Type:AlertRule[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsAccount

Specifies the Run As account to use during connector synchronization.

Type:ManagementPackSecureReference
Required:False
Position:Named
Default value:Operational System Account
Accept pipeline input:False
Accept wildcard characters:False
-SCOMCredential

Specifies the credential to use when connecting to Operations Manager.

Type:PSCredential
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SCSession

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

Type:Connection[]
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SyncNow

Starts a synchronization of the Operations Manager alert connector.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Template

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

Type:ManagementPackObjectTemplate
Required:False
Position:Named
Default value:Operations Manager Incident Template
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None.

You cannot pipe input to this cmdlet.

Outputs

None.

This cmdlet does not generate any output.