Add-SCOMNotificationSubscriber
Adds a notification subscriber in Operations Manager.
Syntax
DeviceName (Default)
Add-SCOMNotificationSubscriber
[-Name] <String>
[-DeviceList] <String[]>
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
DeviceTable
Add-SCOMNotificationSubscriber
[-Name] <String>
[-DeviceTable] <Hashtable>
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Add-SCOMNotificationSubscriber cmdlet adds a notification subscriber in System Center - 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 (.).
Parameter properties
Type: | String[] |
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 |
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | 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 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.
Parameter properties
Type: | 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 |
-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.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | Email, IM, SMS, MobileNumber, Number |
Parameter sets
DeviceName
Position: | 2 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | 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.
Parameter properties
Type: | Hashtable |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
DeviceTable
Position: | 2 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Name
Specifies the name of a notification subscriber.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-SCSession
Specifies an array of Connection objects. To obtain a Connection object, use the Get-SCManagementGroupConnection cmdlet.
Parameter properties
Type: | 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 |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | 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.