Set-WssReportEmailSetting
Set-WssReportEmailSetting
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.
パラメーター
-Credential<PSCredential>
Specifies a credential for SMTP authentication. To obtain a credential object, use the Get-Credential cmdlet.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Disable
Indicates that the email setting is disabled.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Enable
Indicates that the email setting is enabled.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-From<String>
Specifies the sender address of the health report. The sender of the email is the email address that you specify.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Port<Int32>
Specifies the TCP port number of SMTP service. The SMTP service listens on the port you specify.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-SmtpServer<String>
Specifies the SMTP server name.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
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.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-UseAuthentication
Indicates that the SMTP server requires authentication.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-UseSsl
Use this when SSL is required.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
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
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
例
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