Disable-SCOMNotificationSubscription

Disables a notification subscription.

Syntax

Disable-SCOMNotificationSubscription [-Subscription] <NotificationSubscription[]> [-PassThru] [-Confirm]
 [-WhatIf] [<CommonParameters>]

Description

The Disable-SCOMNotificationSubscription cmdlet disables a notification in System Center 2016 - Operations Manager.

Examples

Example 1: Disable all enabled notifications

PS C:\>Get-SCOMNotificationSubscription | where-object{$_.Enabled} | Disable-SCOMNotificationSubscription

This command disables all enabled notifications.

Example 2: Disable notifications to a notification subscriber

PS C:\>Get-SCOMNotificationSubscription | where-object{$_.ToRecipients -contains "CONTOSO\SarahJones"} | Disable-SCOMNotificationSubscription

This command disables all notifications where the TO line of the message includes the user account CONTOSO\SarahJones.

Parameters

-Subscription

Specifies an array of subscriptions to disable.

Type:NotificationSubscription[]
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters: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.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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