Disable-SCOMNotificationSubscription
Disable-SCOMNotificationSubscription
Disables a notification subscription.
Syntax
Parameter Set: Default
Disable-SCOMNotificationSubscription [-Subscription] <NotificationSubscription[]> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Disable-SCOMNotificationSubscription cmdlet disables a notification in System Center 2012 – Operations Manager.
Parameters
-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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Subscription<NotificationSubscription[]>
Specifies an array of subscriptions to disable.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
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.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Disable all enabled notifications
This command disables all enabled notifications.
PS C:\> Get-SCOMNotificationSubscription | where-object{$_.Enabled} | Disable-SCOMNotificationSubscription
Example 2: Disable notifications to a notification subscriber
This command disables all notifications where the TO line of the message includes the user account CONTOSO\SarahJones.
PS C:\> Get-SCOMNotificationSubscription | where-object{$_.ToRecipients -contains "CONTOSO\SarahJones"} | Disable-SCOMNotificationSubscription
Related topics
Add-SCOMNotificationSubscription
Enable-SCOMNotificationSubscription