Enable-SCOMNotificationSubscription
Enables a notification subscription.
Syntax
Default (Default)
Enable-SCOMNotificationSubscription
[-Subscription] <NotificationSubscription[]>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Enable-SCOMNotificationSubscription cmdlet enables a notification subscription in System Center 2016 - Operations Manager.
Examples
Example 1: Enable all notification subscriptions
PS C:\>Get-SCOMNotificationSubscription | where-object{$_.Enabled -eq $false} | Enable-SCOMNotificationSubscription
This command enables all disabled notifications.
Example 2: Enable notification subscriptions for a specific user
PS C:\>Get-SCOMNotificationSubscription | where-object{$_.ToRecipients -contains "Contoso\SarahJones"} | Enable-SCOMNotificationSubscription
This command enables all notifications where the TO line includes a specific user.
Parameters
-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 |
-PassThru
Indicates that the cmdlet creates or modifies an object that a command can use in the pipeline. By default, this cmdlet does not generate any output.
Parameter properties
Type: | 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: | True |
Value from remaining arguments: | False |
-Subscription
Specifies an array of subscriptions to enable. To obtain a notification subscription object, use the Get-SCOMNotificationSubscription cmdlet.
Parameter properties
Type: | NotificationSubscription[] |
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: | 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.