dsccommunity / dsccommunity/SqlServerDsc
SqlRSVirtualDirectory: New resource proposal
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
Resource proposal
Manages virtual directories for ReportServer web service and Reports web portal applications. This resource is separated from URL reservations because changing virtual directories requires removing and re-adding URL reservations. Making this a separate resource gives more control and clearer semantics.
Parent Issue: #2415
Features
- Configures virtual directories for ReportServerWebService and ReportServerWebApp applications
- Supports both replacement pattern (set exact value) and include/exclude pattern (add/remove specific values)
- Supports both SQL Server Reporting Services (SSRS) and Power BI Report Server (PBIRS)
- SQL Server 2019+ only
Commands Used
| Method | Commands |
|---|---|
| Get | Get-SqlDscRSConfiguration (properties: VirtualDirectoryReportServer, VirtualDirectoryReportManager) |
| Test | Compare current virtual directory with desired |
| Set | Set-SqlDscRSVirtualDirectory, Restart-SqlDscRSService |
Proposed properties
| Property | Type qualifier | Data type | Description | Default value | Allowed values |
|---|---|---|---|---|---|
| InstanceName | Key | String | The RS instance name (SSRS or PBIRS) | None | None |
| Application | Key | String | The application to configure | None | ReportServerWebService, ReportServerWebApp |
| VirtualDirectory | Write | String | The exact virtual directory to set (replaces existing). Mutually exclusive with ToInclude/ToExclude. | None | None |
| VirtualDirectoryToInclude | Write | String | Virtual directory to add if not present | None | None |
| VirtualDirectoryToExclude | Write | String | Virtual directory to remove if present | None | None |
| Lcid | Write | UInt32 | Language code identifier | None | None |
| RestartTimeout | Write | UInt32 | Seconds to wait after service restart | None | None |
| SuppressServiceRestart | Write | Boolean | Suppress automatic service restart | $false | None |
Special considerations or limitations
-
Proposed File:
source/Classes/020.SqlRSVirtualDirectory.ps1 -
Inheritance: Inherits from
ResourceBase(from DscResource.Base module), notSqlResourceBase. -
Mutually exclusive properties:
VirtualDirectoryis mutually exclusive withVirtualDirectoryToIncludeandVirtualDirectoryToExclude. When usingVirtualDirectory, the existing virtual directory is replaced. When usingVirtualDirectoryToIncludeand/orVirtualDirectoryToExclude, only the specified changes are made. -
URL reservation impact: Changing virtual directories may require URL reservations to be removed and re-added. Consider using
SqlRSUrlReservationafter this resource. -
Recommended usage order: This resource should be used after
SqlRSSetupand beforeSqlRSUrlReservation. -
Integration tests: Should follow the patterns in
Integration_Test_Commands_ReportingServicesandIntegration_Test_Commands_BIReportServerstages.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the proposed source file source/Classes/020.SqlRSVirtualDirectory.ps1 and the existing SqlRSSetup and SqlRSUrlReservation resources for context. Then inspect the Integration_Test_Commands_ReportingServices and Integration_Test_Commands_BIReportServer stages. Done means the resource supports the listed properties, replacement and include/exclude behavior, and integration coverage for SSRS and PBIRS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100