Set-WssReportEmailSetting

Set-WssReportEmailSetting

Configures the email settings of health report.

Sintaxis

Parameter Set: Enable
Set-WssReportEmailSetting -Enable -From <String> -Port <Int32> -SmtpServer <String> -To <String> [-Credential <PSCredential> ] [-UseAuthentication] [-UseSsl] [ <CommonParameters>]

Parameter Set: Disable
Set-WssReportEmailSetting -Disable [ <CommonParameters>]

Descripción detallada

The Set-WssReportEmailSetting cmdlet configures the email settings of a health report.

Parámetros

-Credential<PSCredential>

Specifies a credential for SMTP authentication. To obtain a credential object, use the Get-Credential cmdlet.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Disable

Indicates that the email setting is disabled.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Enable

Indicates that the email setting is enabled.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-From<String>

Specifies the sender address of the health report. The sender of the email is the email address that you specify.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Port<Int32>

Specifies the TCP port number of SMTP service. The SMTP service listens on the port you specify.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-SmtpServer<String>

Specifies the SMTP server name.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-To<String>

Specifies the email addresses of recipients, separated by a semicolon (;). The recipients of the email are the email addresses that you specify.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-UseAuthentication

Indicates that the SMTP server requires authentication.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-UseSsl

Use this when SSL is required.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • System.Management.Automation.PSCredential,System.Management.Automation.SwitchParameter,System.Management.Automation.SwitchParameter,System.String,System.Int32,System.String,System.String,System.Management.Automation.SwitchParameter,System.Management.Automation.SwitchParameter

    Email settings

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

Ejemplos

Example 1: Set report email settings

The first command creates a $UserName variable.

The second command creates a password for the user by using a secure string conversion cmdlet.

The third command creates a credential for the user by using the New-Object cmdlet.

The last command sets the report email settings.

PS C:\> $UserName = "ContosoUser"
PS C:\> $Password = ConvertTo-SecureString "passw0rd" -AsPlainText -Force
PS C:\> $Cred = New-Object System.Management.Automation.PSCredential($UserName, $Password)
PS C:\> Set-WssReportEmailSetting -Enable -From "Contoso-Admin@contoso.com" -SMTPServer "smtphost" -Port 25 -UseAuthentication -Credential $Cred

Temas relacionados

Get-WssReportEmailSetting