Share via


Disable-SCOMNotificationSubscription

Disables a notification subscription.

Syntax

Default (Default)

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.

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 disable.

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.