Enable-SCOMNotificationSubscription

Enable-SCOMNotificationSubscription

Enables a notification subscription.

Syntax

Parameter Set: Default
Enable-SCOMNotificationSubscription [-Subscription] <NotificationSubscription[]> [-PassThru] [ <CommonParameters>]

Detailed Description

The Enable-SCOMNotificationSubscription cmdlet enables a notification subscription 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 enable. To obtain a notification subscription object, use the Get-SCOMNotificationSubscription cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

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: Enable all notification subscriptions

This command enables all disabled notifications.

PS C:\> Get-SCOMNotificationSubscription | where-object{$_.Enabled -eq $false} | Enable-SCOMNotificationSubscription

Example 2: Enable notification subscriptions for a specific user

This command enables all notifications where the TO line includes a specific user.

PS C:\> Get-SCOMNotificationSubscription | where-object{$_.ToRecipients -contains "Contoso\SarahJones"} | Enable-SCOMNotificationSubscription

Add-SCOMNotificationSubscription

Disable-SCOMNotificationSubscription

Get-SCOMNotificationSubscription

Remove-SCOMNotificationSubscription