Set-WssAlertEmailSetting
Changes settings for alert email notification.
Syntax
Set-WssAlertEmailSetting
[-Setting] <AlertEmailSettings>
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.
Examples
Example 1: Change settings for alert email notification
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
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.
Parameters
-Setting
Specifies the settings for alert email notification.
Type: | AlertEmailSettings |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Related Links
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for