Disable-SCOMNotificationSubscription

Disables a notification subscription.

Syntax

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

Description

The Disable-SCOMNotificationSubscription cmdlet disables a notification in System Center - 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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Subscription

Specifies an array of subscriptions to disable.

Type:NotificationSubscription[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False