Enable-SCOMNotificationSubscription

Updated: October 2, 2015

Enable-SCOMNotificationSubscription

Enables a notification subscription.

Syntax

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




Detailed Description

The Enable-SCOMNotificationSubscription cmdlet enables a notification subscription in System Center 2016 – 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

-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: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

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

Related topics

Community Additions

ADD
Show: