Set-WssAlertEmailSetting

Windows Server 2012 and Windows 8

Set-WssAlertEmailSetting

Changes settings for alert email notification.

Syntax

Parameter Set: Default
Set-WssAlertEmailSetting [-Setting] <AlertEmailSettings> [ <CommonParameters>]




Detailed Description

The Set-WssAlertEmailSetting cmdlet changes settings for alert email notification. Use the Setting parameter to enable or disable alert email notification, configure the SMTP account, and specify the recipients of notification.

Parameters

-Setting<AlertEmailSettings>

Specifies the settings for alert email notification.


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 (http://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: Change settings for alert email notification

The first command gets the current settings for alert email notification and stores the results in the $Setting variable.

The second command disables alert email notification.

The third command sets the SMTP server host to the current server.

The fourth command sets the port for the SMTP server host to 587.

The fourth command specifies the default email address from which the server sends email notification.

The fifth command specifies a semicolon-separated list of email addresses to which the server sends notification.

The sixth command saves the email notification settings.


PS C:\> $Setting = Get-WssAlertEmailSettings
PS C:\> $Setting.Enabled = $false;
PS C:\> $Setting.SmtpServerHost ="smtp.contosoemailhost.com"
PS C:\> $Setting.SmtpPort="587"
PS C:\> $Setting.EmailAddress="john@contoso.com"
PS C:\> $Setting.Recipients="recipient@contoso.com"
PS C:\> Set-WssAlertEmailSetting -Setting $Setting

Related topics

コミュニティの追加

追加
表示: