Set-CMEmailNotificationComponent

Set-CMEmailNotificationComponent

Changes configuration settings of an email notification component.

Syntax

Parameter Set: Disable
Set-CMEmailNotificationComponent -DisableEmailNotification [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: Enable
Set-CMEmailNotificationComponent -EnableEmailNotification -SendFrom <String> -SmtpServerFqdn <String> -TypeOfAuthentication <AuthenticationMethod> {Anonymous | DefaultServiceAccount | Other} [-Port <Int32> ] [-UserName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-CMEmailNotificationComponent cmdlet changes configuration settings of an email notification component in Microsoft System Center 2012 SP1 Configuration Manager. You can configure the email notification component for each System Center 2012 Configuration Manager site to configure email subscriptions to alerts.

Parameters

-DisableEmailNotification

Indicates that email notification is disabled.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EnableEmailNotification

Indicates that Configuration Manager uses an SMTP server to send email alerts.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Port<Int32>

Specifies the outgoing SMTP port for sending email alerts.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SendFrom<String>

Specifies the email address from which Configuration Manager sends email alerts.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SmtpServerFqdn<String>

Specifies the fully qualified domain name (FQDN) of the SMTP server.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-TypeOfAuthentication<AuthenticationMethod>

Specifies the method by which Configuration Manager authenticates the site server to the SMTP Server. The acceptable values for this parameter are:

-- Anonymous
-- DefaultServiceAccount
-- Other

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UserName<String>

Specifies the user name to authenticate with the SMTP server from which Configuration Manager sends email alerts. This parameter also specifies the SMTP Server Connection account.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

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: Enable email notification

This command enables email notification for System Center 2012 Configuration Manager. The command specifies that System Center 2012 Configuration Manager uses the System Center 2012 Configuration Manager site that has the site code CM2 on the server cmcen-dist02.tsqa.corp.contoso.com to host the site system role for email notification. The command specifies that System Center 2012 Configuration Manager uses the server named mail.corp.contosco.com for the email server and specifies the outgoing SMTP port for sending email alerts. The command specifies that System Center 2012 Configuration Manager uses the default service account for authenticating the site server to the SMTP Server, and specifies that System Center 2012 Configuration Manager sends email alerts from the email address evan.narvaez@contoso.com.

PS C:\> Set-CMEmailNotificationComponent -SiteSystemServerName "cmcen-dist02.tsqa.corp.contoso.com" -SiteCode "CM2" -EnableEmailNotification $True -MstpServerFqdn "mail.corp.contosco.com" -Port 25 -TypeOfAuthentication DefaultServiceAccount -SendFrom "evan.narvaez@contoso.com"

Example 2: Disable email notification

This command disables email notification for System Center 2012 Configuration Manager on the site server named cmcen-dist02.tsqa.corp.contoso.com.

PS C:\> Set-CMEmailNotificationComponent -SiteSystemServerName "cmcen-dist02.tsqa.corp.contoso.com" -EnableEmailNotification $False

Example 3: Set the outgoing SMTP port for email notification

This command sets the outgoing SMTP port that System Center 2012 Configuration Manager uses for sending email alerts on the site server named cmcen-dist02.tsqa.corp.contoso.com to port 27.

PS C:\> Set-CMEmailNotificationComponent -SiteSystemServerName "cmcen-dist02.tsqa.corp.contoso.com" -Port 27

Get-CMEmailNotificationComponent