Expand Minimize
This topic has not yet been rated - Rate this topic

Add-SCOMNotificationChannel

Updated: September 10, 2012

Applies To: System Center 2012 - Operations Manager, System Center 2012 SP1 - Operations Manager

Add-SCOMNotificationChannel

Adds a notification channel.

Syntax

Parameter Set: UsingSMTP
Add-SCOMNotificationChannel [-Name] <String> [-From] <String> -Body <String> -Server <String> [-Anonymous] [-BackupSmtpServer <String[]> ] [-BodyAsHtml] [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-Description <String> ] [-DisplayName <String> ] [-Encoding <String> ] [-Header <Hashtable> ] [-MaxPrimaryRecipientsPerMail <Int32> ] [-NoSubjectEncoding] [-Port <UInt32> ] [-PrimaryRetryInterval <TimeSpan> ] [-ReplyTo <String> ] [-SCSession <Connection[]> ] [-Subject <String> ] [ <CommonParameters>]

Parameter Set: CommandAction
Add-SCOMNotificationChannel [-ApplicationPath] <String> [-Name] <String> [[-Argument] <String> ] [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-Description <String> ] [-DisplayName <String> ] [-SCSession <Connection[]> ] [-WorkingDirectory <String> ] [ <CommonParameters>]

Parameter Set: UsingSIP
Add-SCOMNotificationChannel [-Name] <String> [-UserName] <Uri> -Body <String> -Server <String> [-ComputerName <String[]> ] [-ContentType <String> ] [-Credential <PSCredential> ] [-Description <String> ] [-DisplayName <String> ] [-Encoding <String> ] [-Port <UInt32> ] [-PreferredUserName <String> ] [-SCSession <Connection[]> ] [-SipAuthentication <SipNotificationAuthenticationProtocols> ] [-SipProtocol <SipTransportProtocol> ] [ <CommonParameters>]

Parameter Set: UsingSMS
Add-SCOMNotificationChannel [-Name] <String> [[-Device] <String> ] [[-BackupDevice] <String[]> ] -Body <String> -Sms [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-Description <String> ] [-DeviceEnumerationInterval <TimeSpan> ] [-DisplayName <String> ] [-Encoding <String> ] [-PrimaryRetryInterval <TimeSpan> ] [-SCSession <Connection[]> ] [ <CommonParameters>]




Detailed Description

The Add-SCOMNotification cmdlet adds a notification channel.

Notificaton channels inform individuals when an alert happens, or run automation in response to an alert.

Parameters

-Anonymous

If set, will use an anonymous SMTP server.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-ApplicationPath<String>

The application path of a command channel.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Argument<String>

The string of arguments to a command channel.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BackupDevice<String[]>

Secondary SMS devices.


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-BackupSmtpServer<String[]>

One or more backup SMTP servers.

Backup servers will use the same configuration as the primary server.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Body<String>

The body or content of the notification.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-BodyAsHtml

If set, the notification will be an HTML mail.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-ComputerName<String[]>

Specifies a computer to establish a connection with. The computer must be running the System Center Data Access service. The default is the computer for the current management group connection.

Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name. To specify the local computer, type the computer name, "localhost", or a dot (.).


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-ContentType<String>

The content type of the instant message. The default is 'text/plain'


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies a user account under which the management group connection will run. It must have access to the server tat is specified in the ComputerName parameter if specified. The default is the current user.

Enter a PSCredential object, such as one that is returned by the Get-Credential cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Description<String>

A description for the notification channel. If not set, defaults to the displayname.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Device<String>

The primary SMS device.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-DeviceEnumerationInterval<TimeSpan>

The device enumeration interval, for SMS notifications.

The default is 10 seconds


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-DisplayName<String>

The display name for the notification channel. If not set, defaults to the name.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Encoding<String>

The encoding to use for the notification.

SMTP channels default to 'utf-8' encoding.

IM channels default to 'utf-8' encoding.

SMS channels use 'Default' encoding by default, but can alternately use 'Unicode' encoding.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-From<String>

The from field in a notification email.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Header<Hashtable>

Any headers in a notification email.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-MaxPrimaryRecipientsPerMail<Int32>

The maximum number of recipients per notification mail.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

The name of the notification channel.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-NoSubjectEncoding

If set, will not use an encoding for the email subject.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Port<UInt32>

The port used for the channel.

SMTP channels default to port 25

IM channels using TCP default to port 5060

IM channels using TLS default to port 5061


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-PreferredUserName<String>

The preferred username in an IM channel. If not set, defaults to the username.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-PrimaryRetryInterval<TimeSpan>

The retry interval used to attempt to switch back to the primary SMTP server or SMS device. The default is 5 minutes.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-ReplyTo<String>

The reply-to field in a notification email.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-SCSession<Connection[]>

Specifies a connection to a management server. The default is the current management group connection.

Enter a Management group connection object, such as one returned by the Get-SCManagementGroupConnection cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Server<String>

The server used for SMTP and IM channels


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-SipAuthentication<SipNotificationAuthenticationProtocols>

The SIP authentication mechanism (NTLM or Kerberos). Used for IM channels. The default is NTLM.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-SipProtocol<SipTransportProtocol>

The SIP transport protcol (TCP or TLS). Used for IM channels. The default is TCP.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Sms

If set, will send notifications using SMS


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Subject<String>

The subject of the notification mail.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-UserName<Uri>

The IM return address


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-WorkingDirectory<String>

The working directory used for a command channel. Defaults to "%systemdrive%"


Aliases

none

Required?

false

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.

Examples

-------------------------- EXAMPLE 1 --------------------------

This example adds a standard SMTP email channel.


PS C:\>$subject = "SCOM alert `$Data[Default='Not Present']/Context/DataItem/AlertName`$"PS C:\>$body = "Owner is `$Data[Default='Not Present']/Context/DataItem/AlertOwner`$"PS C:\>Add-SCOMNotificationChannel -Name "Contoso.Email" -Server "mail.contoso.com" -From "scom@contoso.net" -Subject $subject -Body $body

-------------------------- EXAMPLE 2 --------------------------

This example adds a new IM channel, with the return address of "scomadmin".


PS C:\>$body = "SCOM alert `$Data[Default='Not Present']/Context/DataItem/AlertName`$"PS C:\>Add-SCOMNotificationChannel -Name "Contoso.IM" -Server "sipserver.contoso.com" -UserName 'sip:scomadmin' -Body $body

-------------------------- EXAMPLE 3 --------------------------

This example adds a new SMS channel with unicode encoding.


PS C:\>$body = "SCOM alert `$Data[Default='Not Present']/Context/DataItem/AlertName`$"PS C:\>Add-SCOMNotificationChannel -Sms -Name "Contoso.SMS" -Body $body -Encoding "Unicode"

-------------------------- EXAMPLE 4 --------------------------

This example adds a new command notification channel which runs the OnNotify.exe program.


PS C:\> $path = "C:\OnNotify.exe"PS C:\>$arg = "/notify /owner `"`$Data[Default='Not Present']/Context/DataItem/AlertOwner`$`""PS C:\>$workingDir = "C:\"PS C:\>Add-SCOMNotificationChannel -Name "Contoso.Command" -ApplicationPath $path -Argument $arg -WorkingDirectory $workingDir
 
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.