Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Configures the email settings of health report.
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>]
The Set-WssReportEmailSetting cmdlet configures the email settings of a health report.
Specifies a credential for SMTP authentication. To obtain a credential object, use the Get-Credential cmdlet.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Indicates that the email setting is disabled.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Indicates that the email setting is enabled.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the sender address of the health report. The sender of the email is the email address that you specify.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the TCP port number of SMTP service. The SMTP service listens on the port you specify.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the SMTP server name.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the email addresses of recipients, separated by a semicolon (;). The recipients of the email are the email addresses that you specify.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Indicates that the SMTP server requires authentication.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Use this when SSL is required.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
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).
The input type is the type of the objects that you can pipe to the 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
The output type is the type of the objects that the cmdlet emits.
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