Disable-NotificationSubscription
Disable-NotificationSubscription
Syntax
Parameter Set: FromRule Disable-NotificationSubscription [-NotificationSubscription] <NotificationSubscription> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
Disables a notification subscription.
Parameters
-NotificationSubscription<NotificationSubscription>
Specifies the notification subscription 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 executing the command.
|
Required? |
false |
|
Position? |
named |
|
Default Value |
none |
|
Accept Pipeline Input? |
false |
|
Accept Wildcard Characters? |
false |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
|
Required? |
false |
|
Position? |
named |
|
Default Value |
none |
|
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
Notes
-
For more information, type "Get-Help Disable-NotificationSubscription -detailed". For technical information, type "Get-Help Disable-NotificationSubscription -full".
When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".
Examples
-------------- EXAMPLE 1 --------------
This command uses Get-NotificationSubscription to retrieve all notification subscriptions. The results are sent to Where-Object, which is used to return only those that are enabled. Finally, Disable-NotificationSubscription is used to disable them.
C:\PS>get-notificationsubscription | where-object {$_.enabled -eq $true} |disable-notificationsubscription
