Add-SCOMNotificationSubscriber

Adds a notification subscriber in Operations Manager.

Syntax

Add-SCOMNotificationSubscriber [-Name] <String> [-DeviceList] <String[]> [-ComputerName <String[]>]
 [-Credential <PSCredential>] [-SCSession <Connection[]>] [-Confirm] [-WhatIf] [<CommonParameters>]
Add-SCOMNotificationSubscriber [-Name] <String> [-DeviceTable] <Hashtable> [-ComputerName <String[]>]
 [-Credential <PSCredential>] [-SCSession <Connection[]>] [-Confirm] [-WhatIf] [<CommonParameters>]

Description

The Add-SCOMNotificationSubscriber cmdlet adds a notification subscriber in System Center 2016 - Operations Manager.

Notification subscribers receive notifications from Operations Manager.

Examples

Example 1: Add a notification subscriber

PS C:\>Add-SCOMNotificationSubscriber -Name "Sarah Jones" -DeviceList "SarahJones@contoso.com", "sms:2065551212", "sip:SarahJ"

This command adds a new notification subscriber with email, SMS, and IM addresses.

Example 2: Add a notification subscriber with a command channel

PS C:\>$CommandChannel = Get-SCOMNotificationChannel -DisplayName "OnNotify.exe"
PS C:\> Add-SCOMNotificationSubscriber -Name "Sarah Jones" -DeviceTable @{"Cell"= 'sms:206555213'; "Command" = $CommandChannel.Name }

This example adds a new notification subscriber with an SMS address and a command address.

The first command uses the Get-SCOMNotificationChannel cmdlet to get the notification channel that has the display name OnNotify.exe, and stores the result in the $CommandChannel variable.

The second command adds a notification subscriber by using the Name parameter.

Parameters

-ComputerName

Specifies an array of names of computers. The cmdlet establishes temporary connections with management groups for these computers. You can use NetBIOS names, IP addresses, or fully qualified domain names (FQDNs). To specify the local computer, type the computer name, localhost, or a dot (.).

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

Specifies a PSCredential object for the management group connection. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type "Get-Help Get-Credential". If you specify a computer in the ComputerName parameter, use an account that has access to that computer. The default is the current user.

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

Specifies an array of notification addresses. Use username@domain.com form for email addresses, SMS:<address> for SMS addresses, and SIP:<address> for IM addresses. Specify the name of a channel for a command channel.

Type:String[]
Aliases:Email, IM, SMS, MobileNumber, Number
Required:True
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DeviceTable

Specifies a table of named addresses. Use username@domain.com form for email addresses, SMS:<address> for SMS addresses, and SIP:<address> for IM addresses. Specify the name of a channel for a command channel.

Type:Hashtable
Required:True
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

Specifies the name of a notification subscriber.

Type:String
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-SCSession

Specifies an array of Connection objects. To obtain a Connection object, use the Get-SCManagementGroupConnection cmdlet.

Type:Connection[]
Required:False
Position:Named
Default value:None
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
-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