Set-CMEmailNotificationComponent

Changes configuration settings of an email notification component.

Syntax

Set-CMEmailNotificationComponent
   [-EnableEmailNotification]
   [-Port <Int32>]
   -SendFrom <String>
   -SmtpServerFqdn <String>
   -TypeOfAuthentication <AuthenticationMethod>
   [-UserName <String>]
   [-UseSsl <Boolean>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-CMEmailNotificationComponent
   [-DisableEmailNotification]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

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

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Enable email notification

PS XYZ:\> Set-CMEmailNotificationComponent -SiteSystemServerName "cmcen-dist02.tsqa.corp.contoso.com" -SiteCode "CM2" -EnableEmailNotification $True -MstpServerFqdn "mail.corp.contosco.com" -Port 25 -TypeOfAuthentication DefaultServiceAccount -SendFrom "[email protected]"

This command enables email notification for Configuration Manager. The command specifies that Configuration Manager uses the 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 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 Configuration Manager uses the default service account for authenticating the site server to the SMTP Server, and specifies that Configuration Manager sends email alerts from the email address [email protected].

Example 2: Disable email notification

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

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

Example 3: Set the outgoing SMTP port for email notification

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

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

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableEmailNotification

Indicates that email notification is disabled.

Type:SwitchParameter
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableEmailNotification

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

Type:SwitchParameter
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Port

Specifies the outgoing SMTP port for sending email alerts.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SendFrom

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SmtpServerFqdn

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-TypeOfAuthentication

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
Type:AuthenticationMethod
Accepted values:Anonymous, DefaultServiceAccount, Other
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-UserName

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.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UseSsl

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None