dsccommunity / dsccommunity/SqlServerDsc

SqlRSConfiguration: New resource proposal

Open
#2,421 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted resource proposal
Dominant language
PowerShell
Stars
385
Forks
224
PR merge metrics
No merged PRs in 30d

Description

Resource proposal

Manages optional Reporting Services configuration settings including SMTP email delivery and unattended execution account. Consolidates advanced configuration not covered by other resources. SMTP and unattended execution account are relatively simple settings that can share a resource.

Parent Issue: #2415

Features
  • Configures SMTP server settings for email delivery of reports
  • Configures sender email address for report subscriptions
  • Manages unattended execution account for data source connections
  • Supports both SQL Server Reporting Services (SSRS) and Power BI Report Server (PBIRS)
  • SQL Server 2019+ only
Commands Used
Method Commands
Get Get-SqlDscRSConfigFile (read SMTP from rsreportserver.config), Get-SqlDscRSConfiguration
Test Compare current settings with desired
Set Set-SqlDscRSSmtpConfiguration, Set-SqlDscRSUnattendedExecutionAccount, Remove-SqlDscRSUnattendedExecutionAccount

Proposed properties

Property Type qualifier Data type Description Default value Allowed values
InstanceName Key String The RS instance name (SSRS or PBIRS) None None
SmtpServer Write String SMTP server name or IP address None None
SenderEmailAddress Write String From address for report emails None None
UnattendedExecutionAccountCredential Write PSCredential Credentials for unattended execution account None None
UnattendedExecutionAccountEnsure Write String Present to set the account, Absent to remove it Present Present, Absent

Special considerations or limitations

  1. Proposed File: source/Classes/020.SqlRSConfiguration.ps1

  2. Inheritance: Inherits from ResourceBase (from DscResource.Base module), not SqlResourceBase.

  3. SMTP configuration: SMTP settings are stored in the rsreportserver.config file. The resource uses Get-SqlDscRSConfigFile to read and Set-SqlDscRSSmtpConfiguration to write these settings.

  4. Unattended execution account: This account is used for data source connections that use stored credentials. Setting UnattendedExecutionAccountEnsure = 'Absent' will remove the account.

  5. Recommended usage order: This resource should be used after SqlRSDatabase has initialized the report server.

  6. Open question: Should this resource be split into separate SqlRSSmtp and SqlRSUnattendedExecutionAccount resources for better single responsibility?

  7. Integration tests: Should follow the patterns in Integration_Test_Commands_ReportingServices and Integration_Test_Commands_BIReportServer stages.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed file source/Classes/020.SqlRSConfiguration.ps1 and review the listed commands for SMTP and unattended execution account configuration. Then follow the patterns in the Integration_Test_Commands_ReportingServices and Integration_Test_Commands_BIReportServer stages. Done means the proposed properties and operations are covered for SSRS and PBIRS, with the resource split question resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
devops, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.