Enable-NotificationSubscription
Enable-NotificationSubscription
Enables a notification subscription.
Syntax
Parameter Set: FromRule
Enable-NotificationSubscription [-NotificationSubscription] <NotificationSubscription> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
Enables a notification subscription.
Parameters
-NotificationSubscription<NotificationSubscription>
Specifies the notification subscription to enable.
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 Enable-NotificationSubscription -detailed". For technical information, type "Get-Help Enable-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 disabled. Finally, Enable-NotificationSubscription is used to enable them.
C:\PS>get-notificationsubscription | where-object {$_.disabled -eq $true} |
enable-notificationsubscription