Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d818f58
Add functions to manage report server database creation and permissions
johlju Jan 3, 2026
b9a3a66
Add System.ComponentModel.TypeConverter to referenced assemblies in S…
johlju Jan 3, 2026
7204a62
Fix comment-based help formatting and enhance QA tests for example co…
johlju Jan 3, 2026
a62b1a9
Fix comment-based help formatting by removing blank lines in example …
johlju Jan 3, 2026
ab8d82c
Fix comment-based help formatting by removing blank lines in example …
johlju Jan 3, 2026
ab908e1
Fix Reporting Services integration test tags and update README for cl…
johlju Jan 3, 2026
2b06005
Fix error handling in Invoke-RsCimMethod to provide descriptive fallb…
johlju Jan 3, 2026
d5f56cf
Fix error handling in Set-SqlDscRSDatabaseConnection by adding -Error…
johlju Jan 4, 2026
8a4938c
Refactor comment-based help structure tests by removing unused variab…
johlju Jan 4, 2026
c4fe9bf
Merge branch 'main' into f/issue-#2021
johlju Jan 4, 2026
6173d16
Add Get-HResultMessage function for translating HRESULT codes and enh…
johlju Jan 4, 2026
a077d47
Add Import-SqlDscPreferredModule to ensure SMO types are loaded in in…
johlju Jan 4, 2026
ed17306
Add "HRESULT" to cSpell words list for improved spell checking
johlju Jan 4, 2026
2cff608
Add notes to Get-HResultMessage function regarding error message reli…
johlju Jan 4, 2026
008e0fb
Enhance Request-SqlDscRSDatabaseScript to check if Reporting Services…
johlju Jan 4, 2026
3aa8e07
Refactor Request-SqlDscRSDatabaseRightsScript and related tests to re…
johlju Jan 4, 2026
a999afc
Refactor tests for Set-SqlDscRSDatabaseConnection to simplify asserti…
johlju Jan 4, 2026
4ce933b
Merge branch 'main' into f/issue-#2021
johlju Jan 4, 2026
a52e4f5
Refactor Set-TargetResource to use public commands for database scrip…
johlju Jan 4, 2026
3c854db
Enhance SqlRS tests by adding WindowsServiceIdentityActual property a…
johlju Jan 5, 2026
c8fbb1b
Update WindowsServiceIdentityActual property in Set-TargetResource te…
johlju Jan 5, 2026
695f3a0
Merge branch 'main' into f/issue-#2021
johlju Jan 5, 2026
fb786a9
`Initialize-SqlDscRS`: Add new command
johlju Jan 5, 2026
5b8244c
Merge branch 'main' into f/issue-#2014
johlju Jan 5, 2026
89f1909
Update CHANGELOG and improve error handling in Initialize-SqlDscRS; e…
johlju Jan 5, 2026
e58427a
Refactor tests to remove unnecessary script block usage in Initialize…
johlju Jan 5, 2026
3f6ccc7
Remove unused Invoke-RsCimMethod function and related tests from DSC_…
johlju Jan 5, 2026
0420110
Remove Invoke-CimMethod stubs and update tests to use Initialize-SqlD…
johlju Jan 5, 2026
1f424f8
Remove tests for Restart-ReportingServicesService to streamline unit …
johlju Jan 5, 2026
c506c98
Fix suppression message attribute in Restart-SqlDscRSService and Test…
johlju Jan 5, 2026
4e9090d
Remove cSpell ignore comment for PBIRS in various scripts and tests f…
johlju Jan 5, 2026
f3e3da2
Remove unnecessary blank line in Test-SqlDscRSInitialized function fo…
johlju Jan 5, 2026
4744e82
Add error handling for service retrieval in Restart-SqlDscRSService f…
johlju Jan 5, 2026
6c62609
Refactor parameter attributes in Restart-SqlDscRSService and update T…
johlju Jan 5, 2026
bd41d8a
Add unit tests for Request-SqlDscRSDatabaseUpgradeScript to validate …
johlju Jan 5, 2026
3524a42
Improve error handling in Request-SqlDscRSDatabaseUpgradeScript and u…
johlju Jan 5, 2026
488a2a9
Add tests for Configuration parameter attributes in Request-SqlDscRSD…
johlju Jan 5, 2026
56d0579
Add integration tests for Power BI Report Server package retrieval an…
johlju Jan 5, 2026
23a70b8
Improve error handling in Request-SqlDscRSDatabaseUpgradeScript by us…
johlju Jan 5, 2026
b2fd299
Enhance error handling in Request-SqlDscRSDatabaseUpgradeScript by in…
johlju Jan 5, 2026
ef8f9aa
Add integration test for Request-SqlDscRSDatabaseUpgradeScript and up…
johlju Jan 5, 2026
7cffa02
Fix error handling in Request-SqlDscRSDatabaseUpgradeScript by using …
johlju Jan 5, 2026
e438f1a
Remove unused service-related strings from English and Swedish locali…
johlju Jan 5, 2026
266edfc
Add DatabaseName and ServerVersion parameters to Request-SqlDscRSData…
johlju Jan 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@
"varchar",
"maxdop",
"hotfixes",
"checkpointing"
"checkpointing",
"HRESULT"
],
"cSpell.ignorePaths": [
".git"
Expand Down
98 changes: 95 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added public command `Request-SqlDscRSDatabaseScript` to generate T-SQL scripts
for creating report server databases. Wraps the `GenerateDatabaseCreationScript`
CIM method and supports configuring database name, language (LCID), and
SharePoint mode ([issue #2017](https://github.com/dsccommunity/SqlServerDsc/issues/2017)).
- Added public command `Request-SqlDscRSDatabaseRightsScript` to generate T-SQL
scripts for granting permissions on report server databases. Wraps the
`GenerateDatabaseRightsScript` CIM method and supports configuring database
name, user name, remote connections, and Windows/SQL authentication types
([issue #2019](https://github.com/dsccommunity/SqlServerDsc/issues/2019)).
- Added public command `Set-SqlDscRSDatabaseConnection` to set
the report server database connection for SQL Server Reporting Services or
Power BI Report Server. Wraps the `SetDatabaseConnection` CIM method and
supports Windows, SQL Server, and Service Account authentication types
([issue #2021](https://github.com/dsccommunity/SqlServerDsc/issues/2021)).
- Added public command `Set-SqlDscRSVirtualDirectory` to set the virtual directory
for Reporting Services applications. Wraps the `SetVirtualDirectory` CIM method
and supports ReportServerWebService, ReportServerWebApp, and ReportManager
Expand Down Expand Up @@ -47,6 +61,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Services configuration instances with consistent error handling. This function
is used by `Enable-SqlDscRsSecureConnection`, `Disable-SqlDscRsSecureConnection`,
and the `SqlRS` resource.
- Added private function `Get-HResultMessage` to translate common Windows HRESULT
error codes into human-readable messages. Used by `Invoke-RsCimMethod` to
provide actionable error messages when Reporting Services CIM methods fail
without detailed error information.
- `Invoke-ReportServerSetupAction`
- Now uses `Format-Path` with `-ExpandEnvironmentVariable` to expand environment
variables in all path parameters (`MediaPath`, `LogPath`, `InstallFolder`)
Expand Down Expand Up @@ -159,6 +177,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added public command `Install-SqlDscFailoverCluster` to install SQL Server in
a failover cluster configuration. Extracted from `Install-SqlDscServer`
InstallFailoverCluster parameter set.
- Added public command `Restart-SqlDscRSService` to restart the Windows service
for SQL Server Reporting Services or Power BI Report Server. Supports waiting
for dependent services, configurable wait time, and accepts pipeline input
from `Get-SqlDscRSConfiguration`.
- Added public command `Test-SqlDscRSInitialized` to test whether a Reporting
Services instance is initialized by checking the `IsInitialized` property of
the configuration CIM instance.
- Added public command `Initialize-SqlDscRS` to initialize Reporting Services
by calling the `InitializeReportServer` CIM method. Used to complete initial
configuration after database and URL setup.

### Changed

Expand All @@ -185,6 +213,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Refactored to use the public command `Set-SqlDscRSVirtualDirectory` for
setting virtual directories instead of calling the CIM method directly
([issue #2015](https://github.com/dsccommunity/SqlServerDsc/issues/2015)).
- Refactored to use the public commands `Request-SqlDscRSDatabaseScript`,
`Request-SqlDscRSDatabaseRightsScript`, and `Set-SqlDscRSDatabaseConnection`
for creating and configuring the report server database instead of calling
the CIM methods directly
([issue #2017](https://github.com/dsccommunity/SqlServerDsc/issues/2017))
([issue #2019](https://github.com/dsccommunity/SqlServerDsc/issues/2019))
([issue #2021](https://github.com/dsccommunity/SqlServerDsc/issues/2021)).
- Refactored to use the public command `Restart-SqlDscRSService` for restarting
the Reporting Services Windows service instead of calling the private
function `Restart-ReportingServicesService` directly.
- Refactored to use the public commands `Test-SqlDscRSInitialized` and
`Initialize-SqlDscRS` for checking and performing Reporting Services
initialization instead of accessing the `IsInitialized` property and
calling the CIM method directly.
- `Assert-SetupActionProperties`
- Refactored to use the command `Get-FileVersion` from the DscResource.Common
module instead of the private function `Get-FileVersionInformation`
Expand All @@ -201,6 +243,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- `Invoke-RsCimMethod`
- Enhanced error messages to include human-readable translations of common
HRESULT error codes. When Reporting Services CIM methods fail without
detailed error information, the error message now includes actionable
guidance based on the HRESULT code (e.g., service not running, access
denied, logon type not granted).
- Fixed error handling to properly surface error details. Previously, when
the `ExtendedErrors` property existed but was empty, the error message
would show an empty error description. Now it correctly falls back to
the `Error` property and provides a descriptive fallback message if
neither property contains error details.
- Prerequisites Integration Tests
- Fixed missing RS (Reporting Services) integration test tags on Context blocks
that create local Windows users, service accounts, and groups. Added tags
`Integration_SQL2017_RS`, `Integration_SQL2019_RS`, and `Integration_SQL2022_RS`
to ensure these prerequisites run before Reporting Services integration tests.
- `New-SqlDscFileGroup`
- Fixed comment-based help example formatting by moving inline comment
to the description text.
- QA Tests
- Added new test to detect comments within multi-line example code blocks
in comment-based help. Comments in the code portion of `.EXAMPLE` blocks
cause PlatyPS documentation generation to fail with "Expect Heading" errors.
- Added new test to detect blank lines within multi-line example code blocks
in comment-based help. Blank lines within the code portion of `.EXAMPLE`
blocks cause similar issues with documentation generation.
- `Deny-SqlDscServerPermission`
- Fixed comment-based help example formatting by removing blank lines
within code blocks that would cause documentation generation issues.
- `Get-SqlDscServerPermission`
- Fixed comment-based help example formatting by removing blank lines
within code blocks that would cause documentation generation issues.
- `Grant-SqlDscServerPermission`
- Fixed comment-based help example formatting by removing blank lines
within code blocks that would cause documentation generation issues.
- `New-SqlDscDatabase`
- Fixed comment-based help example formatting by removing blank lines
within code blocks.
- `New-SqlDscDatabaseSnapshot`
- Fixed comment-based help example formatting by removing blank lines
within code blocks.
- `Revoke-SqlDscServerPermission`
- Fixed comment-based help example formatting by removing blank lines
within code blocks.
- `Set-SqlDscDatabasePermission`
- Fixed comment-based help example formatting by removing blank lines
within code blocks.
- `Set-SqlDscServerPermission`
- Fixed comment-based help example formatting by removing blank lines
within code blocks.
- `Test-SqlDscServerPermission`
- Fixed comment-based help example formatting by removing blank lines
within code blocks.
- Unit Tests
- Fixed PowerShell class type identity issues that caused "Cannot convert
'Type' to 'Type'" errors when running multiple test files in the same
Expand Down Expand Up @@ -260,9 +355,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Set-SqlDscDatabaseProperty`
- Updated comment-based help to reference correct enum values.
- Added SQL Server version requirements to version-specific parameter help.

### Fixed

- `DatabasePermission`
- Fixed `Equals()` method to compare both `State` and `Permission` properties.
Previously, the method incorrectly referenced a non-existent `Grant` property,
Expand Down
35 changes: 35 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ stages:
# Run the integration tests in a specific group order.
# Group 0
'tests/Integration/Commands/Prerequisites.Integration.Tests.ps1'
'tests/Integration/Commands/Prerequisites.RSDB.Integration.Tests.ps1'
'tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1'
'tests/Integration/Commands/Import-SqlDscPreferredModule.Integration.Tests.ps1'
# Group 1
Expand All @@ -539,6 +540,8 @@ stages:
'tests/Integration/Commands/Get-SqlDscRSPackage.Integration.Tests.ps1'
'tests/Integration/Commands/Get-SqlDscRSSetupConfiguration.Integration.Tests.ps1'
'tests/Integration/Commands/Test-SqlDscRSInstalled.Integration.Tests.ps1'
'tests/Integration/Commands/Request-SqlDscRSDatabaseScript.Integration.Tests.ps1'
'tests/Integration/Commands/Request-SqlDscRSDatabaseRightsScript.Integration.Tests.ps1'
# Group 3
'tests/Integration/Commands/Get-SqlDscRSConfiguration.Integration.Tests.ps1'
'tests/Integration/Commands/Enable-SqlDscRsSecureConnection.Integration.Tests.ps1'
Expand All @@ -548,6 +551,11 @@ stages:
'tests/Integration/Commands/Add-SqlDscRSUrlReservation.Integration.Tests.ps1'
'tests/Integration/Commands/Remove-SqlDscRSUrlReservation.Integration.Tests.ps1'
'tests/Integration/Commands/Set-SqlDscRSUrlReservation.Integration.Tests.ps1'
'tests/Integration/Commands/Set-SqlDscRSDatabaseConnection.Integration.Tests.ps1'
'tests/Integration/Commands/Restart-SqlDscRSService.Integration.Tests.ps1'
'tests/Integration/Commands/Test-SqlDscRSInitialized.Integration.Tests.ps1'
# Group 4
'tests/Integration/Commands/Initialize-SqlDscRS.Integration.Tests.ps1'
# Group 8
'tests/Integration/Commands/Repair-SqlDscReportingService.Integration.Tests.ps1'
# Group 9
Expand Down Expand Up @@ -605,6 +613,7 @@ stages:
# Run the integration tests in a specific group order.
# Group 0
'tests/Integration/Commands/Prerequisites.Integration.Tests.ps1'
'tests/Integration/Commands/Prerequisites.RSDB.Integration.Tests.ps1'
'tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1'
'tests/Integration/Commands/Import-SqlDscPreferredModule.Integration.Tests.ps1'
# Group 1
Expand All @@ -614,6 +623,8 @@ stages:
'tests/Integration/Commands/Get-SqlDscRSPackage.Integration.Tests.ps1'
'tests/Integration/Commands/Get-SqlDscRSSetupConfiguration.Integration.Tests.ps1'
'tests/Integration/Commands/Test-SqlDscRSInstalled.Integration.Tests.ps1'
'tests/Integration/Commands/Request-SqlDscRSDatabaseScript.Integration.Tests.ps1'
'tests/Integration/Commands/Request-SqlDscRSDatabaseRightsScript.Integration.Tests.ps1'
# Group 3
'tests/Integration/Commands/Get-SqlDscRSConfiguration.Integration.Tests.ps1'
'tests/Integration/Commands/Enable-SqlDscRsSecureConnection.Integration.Tests.ps1'
Expand All @@ -623,6 +634,30 @@ stages:
'tests/Integration/Commands/Add-SqlDscRSUrlReservation.Integration.Tests.ps1'
'tests/Integration/Commands/Remove-SqlDscRSUrlReservation.Integration.Tests.ps1'
'tests/Integration/Commands/Set-SqlDscRSUrlReservation.Integration.Tests.ps1'
'tests/Integration/Commands/Set-SqlDscRSDatabaseConnection.Integration.Tests.ps1'
'tests/Integration/Commands/Get-SqlDscRSSslCertificateBinding.Integration.Tests.ps1'
'tests/Integration/Commands/Add-SqlDscRSSslCertificateBinding.Integration.Tests.ps1'
'tests/Integration/Commands/Remove-SqlDscRSSslCertificateBinding.Integration.Tests.ps1'
'tests/Integration/Commands/Set-SqlDscRSSslCertificateBinding.Integration.Tests.ps1'
'tests/Integration/Commands/Get-SqlDscRSServiceAccount.Integration.Tests.ps1'
'tests/Integration/Commands/Set-SqlDscRSServiceAccount.Integration.Tests.ps1'
'tests/Integration/Commands/Restart-SqlDscRSService.Integration.Tests.ps1'
'tests/Integration/Commands/Get-SqlDscRSSslCertificate.Integration.Tests.ps1'
'tests/Integration/Commands/Get-SqlDscRSIPAddress.Integration.Tests.ps1'
'tests/Integration/Commands/Get-SqlDscRSDatabaseInstallation.Integration.Tests.ps1'
'tests/Integration/Commands/Request-SqlDscRSDatabaseUpgradeScript.Integration.Tests.ps1'
'tests/Integration/Commands/Set-SqlDscRSEmailConfiguration.Integration.Tests.ps1'
'tests/Integration/Commands/Set-SqlDscRSUnattendedExecutionAccount.Integration.Tests.ps1'
'tests/Integration/Commands/Remove-SqlDscRSUnattendedExecutionAccount.Integration.Tests.ps1'
'tests/Integration/Commands/Test-SqlDscRSInitialized.Integration.Tests.ps1'
# Group 4
'tests/Integration/Commands/Initialize-SqlDscRS.Integration.Tests.ps1'
# Group 5
'tests/Integration/Commands/Backup-SqlDscRSEncryptionKey.Integration.Tests.ps1'
'tests/Integration/Commands/Restore-SqlDscRSEncryptionKey.Integration.Tests.ps1'
# Group 7
'tests/Integration/Commands/New-SqlDscRSEncryptionKey.Integration.Tests.ps1'
'tests/Integration/Commands/Remove-SqlDscRSEncryptionKey.Integration.Tests.ps1'
# Group 8
'tests/Integration/Commands/Repair-SqlDscPowerBIReportServer.Integration.Tests.ps1'
# Group 9
Expand Down
Loading
Loading