SqlServerDsc.psd1

@{
    # Script module or binary module file associated with this manifest.
    RootModule           = 'SqlServerDsc.psm1'

    # Version number of this module.
    ModuleVersion        = '17.3.0'

    # ID used to uniquely identify this module
    GUID                 = '693ee082-ed36-45a7-b490-88b07c86b42f'

    # Author of this module
    Author               = 'DSC Community'

    # Company or vendor of this module
    CompanyName          = 'DSC Community'

    # Copyright statement for this module
    Copyright            = 'Copyright the DSC Community contributors. All rights reserved.'

    # Description of the functionality provided by this module
    Description          = 'This module contains commands and DSC resources for deployment and configuration of Microsoft SQL Server, SQL Server Reporting Services and Power BI Report Server.'

    # Minimum version of the Windows PowerShell engine required by this module
    PowerShellVersion    = '5.0'

    # Minimum version of the common language runtime (CLR) required by this module
    CLRVersion           = '4.0'

    # Functions to export from this module
    FunctionsToExport    = @('Add-SqlDscNode','Add-SqlDscTraceFlag','Assert-SqlDscAgentOperator','Assert-SqlDscLogin','Complete-SqlDscFailoverCluster','Complete-SqlDscImage','Connect-SqlDscDatabaseEngine','ConvertFrom-SqlDscDatabasePermission','ConvertFrom-SqlDscServerPermission','ConvertTo-SqlDscDatabasePermission','ConvertTo-SqlDscEditionName','ConvertTo-SqlDscServerPermission','Deny-SqlDscServerPermission','Disable-SqlDscAgentOperator','Disable-SqlDscAudit','Disable-SqlDscLogin','Disconnect-SqlDscDatabaseEngine','Enable-SqlDscAgentOperator','Enable-SqlDscAudit','Enable-SqlDscLogin','Get-SqlDscAgentAlert','Get-SqlDscAgentOperator','Get-SqlDscAudit','Get-SqlDscConfigurationOption','Get-SqlDscDatabase','Get-SqlDscDatabasePermission','Get-SqlDscInstalledInstance','Get-SqlDscLogin','Get-SqlDscManagedComputer','Get-SqlDscManagedComputerInstance','Get-SqlDscManagedComputerService','Get-SqlDscPreferredModule','Get-SqlDscRole','Get-SqlDscRSSetupConfiguration','Get-SqlDscServerPermission','Get-SqlDscServerProtocol','Get-SqlDscServerProtocolName','Get-SqlDscStartupParameter','Get-SqlDscTraceFlag','Grant-SqlDscServerPermission','Import-SqlDscPreferredModule','Initialize-SqlDscRebuildDatabase','Install-SqlDscBIReportServer','Install-SqlDscReportingService','Install-SqlDscServer','Invoke-SqlDscQuery','New-SqlDscAgentAlert','New-SqlDscAgentOperator','New-SqlDscAudit','New-SqlDscDatabase','New-SqlDscLogin','New-SqlDscRole','Remove-SqlDscAgentAlert','Remove-SqlDscAgentOperator','Remove-SqlDscAudit','Remove-SqlDscDatabase','Remove-SqlDscLogin','Remove-SqlDscNode','Remove-SqlDscRole','Remove-SqlDscTraceFlag','Repair-SqlDscBIReportServer','Repair-SqlDscReportingService','Repair-SqlDscServer','Revoke-SqlDscServerPermission','Save-SqlDscSqlServerMediaFile','Set-SqlDscAgentAlert','Set-SqlDscAgentOperator','Set-SqlDscAudit','Set-SqlDscConfigurationOption','Set-SqlDscDatabase','Set-SqlDscDatabaseDefault','Set-SqlDscDatabasePermission','Set-SqlDscServerPermission','Set-SqlDscStartupParameter','Set-SqlDscTraceFlag','Test-SqlDscAgentAlertProperty','Test-SqlDscConfigurationOption','Test-SqlDscDatabase','Test-SqlDscIsAgentAlert','Test-SqlDscIsAgentOperator','Test-SqlDscIsDatabasePrincipal','Test-SqlDscIsLogin','Test-SqlDscIsLoginEnabled','Test-SqlDscIsRole','Test-SqlDscIsSupportedFeature','Test-SqlDscRSInstalled','Test-SqlDscServerPermission','Uninstall-SqlDscBIReportServer','Uninstall-SqlDscReportingService','Uninstall-SqlDscServer')

    # Cmdlets to export from this module
    # Use wildcard to avoid PSDesiredStateConfiguration 2.0.7 filtering class-based DSC resources (see #2109).
    CmdletsToExport      = '*'

    # Variables to export from this module
    VariablesToExport    = @()

    # Aliases to export from this module
    AliasesToExport      = 'Test-SqlDscAgentAlert'

    DscResourcesToExport = @('SqlAgentAlert','SqlAudit','SqlDatabasePermission','SqlPermission','SqlRSSetup','SqlAG','SqlAGDatabase','SqlAgentFailsafe','SqlAgentOperator','SqlAGListener','SqlAGReplica','SqlAlias','SqlAlwaysOnService','SqlConfiguration','SqlDatabase','SqlDatabaseDefaultLocation','SqlDatabaseMail','SqlDatabaseObjectPermission','SqlDatabaseRole','SqlDatabaseUser','SqlEndpoint','SqlEndpointPermission','SqlLogin','SqlMaxDop','SqlMemory','SqlProtocol','SqlProtocolTcpIp','SqlReplication','SqlRole','SqlRS','SqlScript','SqlScriptQuery','SqlSecureConnection','SqlServiceAccount','SqlSetup','SqlTraceFlag','SqlWaitForAG','SqlWindowsFirewall')

    RequiredAssemblies   = @()

    # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
    PrivateData          = @{

        PSData = @{
            # Set to a prerelease string value if the release should be a prerelease.
            Prerelease   = 'preview0007'

            # Tags applied to this module. These help with module discovery in online galleries.
            Tags         = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource', 'SqlServer', 'PowerBI', 'ReportingServices', 'ReportServer')

            # A URL to the license for this module.
            LicenseUri   = 'https://github.com/dsccommunity/SqlServerDsc/blob/main/LICENSE'

            # A URL to the main website for this project.
            ProjectUri   = 'https://github.com/dsccommunity/SqlServerDsc'

            # A URL to an icon representing this module.
            IconUri      = 'https://dsccommunity.org/images/DSC_Logo_300p.png'

            # ReleaseNotes of this module
            ReleaseNotes = '## [17.3.0-preview0007] - 2025-10-11

### Added

- Added integration tests for `Get-SqlDscDatabasePermission` command to ensure
  database permission retrieval functions correctly in real environments
  [issue #2221](https://github.com/dsccommunity/SqlServerDsc/issues/2221).
- Added integration tests for `Get-SqlDscManagedComputer` command to ensure it
  functions correctly in real environments
  [issue #2220](https://github.com/dsccommunity/SqlServerDsc/issues/2220).
- Added integration tests for `Remove-SqlDscAudit` command to ensure it functions
  correctly in real environments
  [issue #2241](https://github.com/dsccommunity/SqlServerDsc/issues/2241).
- Added integration tests for `ConvertFrom-SqlDscDatabasePermission` command to
  ensure it functions correctly in real environments
  [issue #2211](https://github.com/dsccommunity/SqlServerDsc/issues/2211).
- Added integration tests for `Get-SqlDscStartupParameter` command to ensure it
  functions correctly in real environments
  [issue #2217](https://github.com/dsccommunity/SqlServerDsc/issues/2217).
- Added integration tests for `Get-SqlDscTraceFlag` command to ensure it functions
  correctly in real environments
  [issue #2216](https://github.com/dsccommunity/SqlServerDsc/issues/2216).
- Added integration tests for `Get-SqlDscPreferredModule` command to ensure it
  functions correctly in real environments
  [issue #2218](https://github.com/dsccommunity/SqlServerDsc/issues/2218).
- Added integration tests for `Enable-SqlDscAudit` command to ensure command
  reliability [issue #2223](https://github.com/dsccommunity/SqlServerDsc/issues/2223).
- Added integration tests for `Get-SqlDscAudit` command to ensure it functions
  correctly in real environments
  [issue #2222](https://github.com/dsccommunity/SqlServerDsc/issues/2222).
- Added integration tests for `Disconnect-SqlDscDatabaseEngine` command to ensure
  command reliability in real environments
  [issue #2224](https://github.com/dsccommunity/SqlServerDsc/issues/2224).
- Added integration tests for `Invoke-SqlDscQuery` command to ensure it functions
  correctly in real environments
  [issue #2227](https://github.com/dsccommunity/SqlServerDsc/issues/2227).
- Added integration tests for `New-SqlDscAudit` command to ensure it functions
  correctly in real environments
  [issue #2226](https://github.com/dsccommunity/SqlServerDsc/issues/2226).
- Added integration tests for `Test-SqlDscIsLogin` command to ensure it functions
  correctly in real environments
  [issue #2230](https://github.com/dsccommunity/SqlServerDsc/issues/2230).
- Added integration tests for `Test-SqlDscIsDatabasePrincipal` command to ensure
  it functions correctly in real environments
  [issue #2231](https://github.com/dsccommunity/SqlServerDsc/issues/2231).

### Fixed

- Corrected error message in test file to recommend ''noop'' task instead of ''build''
  task for resolving dependencies
  ([issue #2279](https://github.com/dsccommunity/SqlServerDsc/issues/2279)).
- Updated integration test documentation in `tests/Integration/Commands/README.md`
  to correctly reflect that `ConvertFrom-SqlDscDatabasePermission` test does not
  require database instance connectivity
  [issue #2284](https://github.com/dsccommunity/SqlServerDsc/issues/2284).
- Added integration tests for `Set-SqlDscAudit` command to ensure it functions
  correctly in real environments
  [issue #2236](https://github.com/dsccommunity/SqlServerDsc/issues/2236).
- Added integration tests for `Set-SqlDscStartupParameter` command to ensure
  reliable startup parameter configuration
  [issue #2233](https://github.com/dsccommunity/SqlServerDsc/issues/2233).
- Added integration tests for `Set-SqlDscServerPermission` command to ensure it
  functions correctly in real environments
  [issue #2234](https://github.com/dsccommunity/SqlServerDsc/issues/2234).
- Added integration tests for `Save-SqlDscSqlServerMediaFile` command to ensure
  it functions correctly in real environments
  [issue #2237](https://github.com/dsccommunity/SqlServerDsc/issues/2237).
- Added integration tests for `Disable-SqlDscAudit` command to ensure it functions
  correctly in real environments
  [issue #2206](https://github.com/dsccommunity/SqlServerDsc/issues/2206).
- Added integration tests for `ConvertTo-SqlDscDatabasePermission` command to
  ensure command reliability
  [issue #2209](https://github.com/dsccommunity/SqlServerDsc/issues/2209).
- Added integration tests for `Set-SqlDscDatabasePermission` command to ensure
  command reliability
  [issue #2235](https://github.com/dsccommunity/SqlServerDsc/issues/2235).
- Added integration test for `ConvertTo-SqlDscEditionName` command to ensure
  command reliability in real environments
  [issue #2208](https://github.com/dsccommunity/SqlServerDsc/issues/2208).
- Added integration tests for `Import-SqlDscPreferredModule` command to ensure
  proper module import functionality in real environments
  [issue #2225](https://github.com/dsccommunity/SqlServerDsc/issues/2225).
- Added integration tests for `Test-SqlDscIsSupportedFeature` command to ensure
  it functions correctly in real environments
  [issue #2228](https://github.com/dsccommunity/SqlServerDsc/issues/2228).
- Added integration test for `Get-SqlDscManagedComputerService` command to ensure
  command reliability [issue #2219](https://github.com/dsccommunity/SqlServerDsc/issues/2219).
- Added integration tests for `Set-SqlDscTraceFlag` command to ensure it functions
  correctly in real environments
  [issue #2232](https://github.com/dsccommunity/SqlServerDsc/issues/2232).
- Added integration tests for `ConvertFrom-SqlDscServerPermission` command to
  ensure it functions correctly in real environments
  [issue #2210](https://github.com/dsccommunity/SqlServerDsc/issues/2210).
- `Remove-SqlDscTraceFlag`
  - Added missing integration test to ensure command reliability ([issue #2239](https://github.com/dsccommunity/SqlServerDsc/issues/2239)).
- `Remove-SqlDscAudit`
  - Added missing integration test to ensure command reliability ([issue #2241](https://github.com/dsccommunity/SqlServerDsc/issues/2241)).
- Added integration tests for `Test-SqlDscIsRole` command to ensure it functions
  correctly in real environments
  [issue #2229](https://github.com/dsccommunity/SqlServerDsc/issues/2229).
- Added integration tests for `Add-SqlDscTraceFlag` command to ensure it functions
  correctly in real environments
  [issue #2214](https://github.com/dsccommunity/SqlServerDsc/issues/2214).
- `Set-SqlDscAudit`
  - Added `AllowAuditGuidChange` parameter to enable modifying the audit GUID
    by dropping and recreating the audit with the new GUID. This parameter is
    required when changing the `AuditGuid` property because SQL Server does not
    allow direct modification of the audit GUID ([issue #2287](https://github.com/dsccommunity/SqlServerDsc/issues/2287)).
- `Save-SqlDscSqlServerMediaFile`
  - Fixed the Force parameter to work correctly when the target ISO file already
    exists. The command now properly overwrites the target file when Force is
    specified. Removed the safety check that was incorrectly blocking execution
    when other ISO files existed in the destination directory
    ([issue #2280](https://github.com/dsccommunity/SqlServerDsc/issues/2280)).
- `DSC_SqlRS`
  - Fixed intermittent initialization failures on resource-constrained systems
    (particularly Windows Server 2025 in CI) by adding an optional `RestartTimeout`
    parameter that allows specifying a wait period (in seconds) after service
    restart to allow Reporting Services to fully initialize before attempting
    to get configuration data or run initialization methods. The timeout is applied
    both after the initial service restart and before calling `InitializeReportServer()`
    if needed, giving the WMI provider sufficient time to be ready. When not specified,
    no additional wait time is applied, maintaining backward compatibility.
- `New-SqlDscAudit`
  - Fixed parameter validation to prevent the `ReserveDiskSpace` parameter from
    being used with the `FileWithMaxFiles` parameter set (when only `MaximumFiles`
    is specified without `MaximumFileSize`). This combination always resulted in
    a SQL Server error because `RESERVE_DISK_SPACE` cannot be specified when
    `MAXSIZE = UNLIMITED`. The `ReserveDiskSpace` parameter now correctly requires
    both `MaximumFiles` and `MaximumFileSize` to be specified
    ([issue #2289](https://github.com/dsccommunity/SqlServerDsc/issues/2289)).
- `Add-SqlDscTraceFlag` and `Remove-SqlDscTraceFlag`
  - Fixed parameter binding error when `ErrorAction` was specified both
    explicitly and via `PSBoundParameters` by using `Remove-CommonParameter`
    instead of manual parameter removal
    ([issue #2239](https://github.com/dsccommunity/SqlServerDsc/issues/2239)).
- `Remove-SqlDscTraceFlag`
  - Optimized to skip unnecessary Set operations when removal results in no
    effective change
    ([issue #2239](https://github.com/dsccommunity/SqlServerDsc/issues/2239)).
- Updated `.gitattributes` to enforce LF line endings for PowerShell files to
  ensure cross-platform compatibility.

### Changed

- `Add-SqlDscTraceFlag`
  - Improved de-duplication logic to normalize element types to `[System.UInt32]`
    before sorting and removing duplicates, ensuring proper handling of mixed
    numeric types ([issue #2277](https://github.com/dsccommunity/SqlServerDsc/issues/2277)).
  - Added idempotent behavior by comparing current and desired trace flags before
    calling `Set-SqlDscTraceFlag`, skipping unnecessary writes when there are no
    effective changes ([issue #2277](https://github.com/dsccommunity/SqlServerDsc/issues/2277)).
- Refactored integration tests to remove `finally` blocks from `It`-blocks and
  use Pester `BeforeEach`/`AfterEach` blocks instead, following DSC Community
  coding guidelines. This improves test cleanup reliability and maintainability
  across the following test files ([issue #2288](https://g'


        } # End of PSData hashtable

    } # End of PrivateData hashtable
}