Set‑SqlDscRSSmtpConfiguration - dsccommunity/SqlServerDsc GitHub Wiki
Sets the SMTP configuration for SQL Server Reporting Services.
Set-SqlDscRSSmtpConfiguration [-Configuration] <Object> [-SmtpServer] <String> [-SenderEmailAddress] <String>
[-PassThru] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
Sets the SMTP configuration for SQL Server Reporting Services
or Power BI Report Server by calling the SetEmailConfiguration
method on the MSReportServer_ConfigurationSetting CIM instance.
This command configures the SMTP settings used for email delivery of reports through subscriptions.
The configuration CIM instance can be obtained using the
Get-SqlDscRSConfiguration command and passed via the pipeline.
Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Set-SqlDscRSSmtpConfiguration -SmtpServer 'smtp.contoso.com' -SenderEmailAddress '[email protected]'
Configures SMTP delivery using the specified SMTP server.
$config = Get-SqlDscRSConfiguration -InstanceName 'SSRS'
Set-SqlDscRSSmtpConfiguration -Configuration $config -SmtpServer 'smtp.contoso.com' -SenderEmailAddress '[email protected]' -Force
Configures SMTP delivery without confirmation.
Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Set-SqlDscRSSmtpConfiguration -SmtpServer 'smtp.contoso.com' -SenderEmailAddress '[email protected]' -PassThru
Configures SMTP delivery and returns the configuration CIM instance.
Specifies the MSReportServer_ConfigurationSetting CIM instance for
the Reporting Services instance.
This can be obtained using the
Get-SqlDscRSConfiguration command.
This parameter accepts pipeline
input.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseIf specified, suppresses the confirmation prompt.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseIf specified, returns the configuration CIM instance after setting the SMTP configuration.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the email address to use in the "From" field of sent emails.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the SMTP server to use for sending email. This can be a server name or IP address.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The Reporting Services service may need to be restarted for the changes to take effect.