SqlServerDsc

17.3.0-preview0004

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 PowerShell version

5.0

This is a prerelease version of SqlServerDsc.

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name SqlServerDsc -AllowPrerelease

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name SqlServerDsc -Prerelease

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

Copyright the DSC Community contributors. All rights reserved.

Package Details

Author(s)

  • DSC Community

Tags

DesiredStateConfiguration DSC DSCResourceKit DSCResource SqlServer PowerBI ReportingServices ReportServer

Functions

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

DSCResources

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

Dependencies

This module has no dependencies.

Release Notes

## [17.3.0-preview0004] - 2025-09-26

### 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).
- 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).

### Changed

- `Test-SqlDscIsDatabasePrincipal` and `Get-SqlDscDatabasePermission`
 - Added `Refresh` parameter to refresh SMO collections before checking
   database principals, addressing issues with custom database roles created
   via T-SQL that aren't immediately visible to SMO. The refresh logic is
   optimized to only refresh collections that will be used based on exclude
   parameters, improving performance on databases with large numbers of principals
   ([issue #2221](https://github.com/dsccommunity/SqlServerDsc/issues/2221)).

### Fixed

- `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.
- Updated GitHub Copilot setup workflow to fix environment variable assignment
 in task.
- Updated VS Code tasks configuration to use proper build and test commands
 with improved task grouping and problem matchers.
- Updated instruction files to use correct build command (`noop` instead of
 `build`) and fixed file pattern matching syntax.

FileList

Version History

Version Downloads Last updated
17.3.0-previ... (current version) 9 9/28/2025
17.3.0-previ... 4 9/26/2025
17.3.0-previ... 4 9/24/2025
17.3.0-previ... 5 9/21/2025
17.2.0 57,612 9/16/2025
17.2.0-previ... 3 9/15/2025
17.2.0-previ... 6 9/13/2025
17.2.0-previ... 5 9/12/2025
17.2.0-previ... 13 9/7/2025
17.2.0-previ... 5 9/6/2025
17.2.0-previ... 5 9/6/2025
17.2.0-previ... 10 9/1/2025
17.2.0-previ... 4 8/31/2025
17.2.0-previ... 4 8/31/2025
17.2.0-previ... 5 8/30/2025
17.2.0-previ... 5 8/30/2025
17.2.0-previ... 4 8/29/2025
17.2.0-previ... 15 8/25/2025
17.2.0-previ... 11 8/22/2025
17.2.0-previ... 4 8/19/2025
17.2.0-previ... 15 8/9/2025
17.2.0-previ... 14 8/3/2025
17.1.0 519,633 5/22/2025
17.1.0-previ... 27 5/2/2025
17.1.0-previ... 6 5/1/2025
17.1.0-previ... 37 4/7/2025
17.1.0-previ... 7 4/6/2025
17.1.0-previ... 4 4/4/2025
17.1.0-previ... 44 3/24/2025
17.1.0-previ... 14 3/19/2025
17.1.0-previ... 12 3/13/2025
17.1.0-previ... 8 3/12/2025
17.1.0-previ... 5 3/11/2025
17.1.0-previ... 30 3/4/2025
17.1.0-previ... 9 3/2/2025
17.0.1-previ... 106 10/29/2024
17.0.1-previ... 8 10/26/2024
17.0.1-previ... 16 10/7/2024
17.0.0 2,200,919 9/30/2024
17.0.0-previ... 8 9/29/2024
17.0.0-previ... 52 8/13/2024
16.6.1-previ... 120 5/23/2024
16.6.1-previ... 7 5/22/2024
16.6.0 92,937 5/17/2024
16.6.0-previ... 12 5/12/2024
16.6.0-previ... 6 5/11/2024
16.6.0-previ... 112 3/3/2024
16.6.0-previ... 48 1/20/2024
16.6.0-previ... 8 1/19/2024
16.5.1-previ... 70 12/15/2023
16.5.1-previ... 93 11/19/2023
16.5.1-previ... 49 11/2/2023
16.5.0 145,925 10/5/2023
16.5.0-previ... 15 10/1/2023
16.5.0-previ... 10 9/29/2023
16.5.0-previ... 51 9/1/2023
16.5.0-previ... 9 8/26/2023
16.4.1-previ... 8 8/25/2023
16.4.0 111,806 8/22/2023
16.4.0-previ... 7 8/20/2023
16.4.0-previ... 7 8/20/2023
16.4.0-previ... 7 8/19/2023
16.4.0-previ... 78 5/18/2023
16.4.0-previ... 22 5/10/2023
16.4.0-previ... 8 5/9/2023
16.4.0-previ... 10 5/8/2023
16.3.1 460,771 5/6/2023
16.3.1-previ... 7 5/6/2023
16.3.1-previ... 11 5/4/2023
16.3.0 42,395 4/26/2023
16.3.0-previ... 10 4/26/2023
16.3.0-previ... 9 4/25/2023
16.3.0-previ... 8 4/24/2023
16.3.0-previ... 7 4/23/2023
16.3.0-previ... 30 4/18/2023
16.3.0-previ... 9 4/16/2023
16.2.1-previ... 10 4/12/2023
16.2.0 75,339 4/10/2023
16.2.0-previ... 8 4/10/2023
16.2.0-previ... 6 4/8/2023
16.2.0-previ... 7 4/8/2023
16.2.0-previ... 12 4/6/2023
16.2.0-previ... 13 4/1/2023
16.2.0-previ... 14 3/28/2023
16.2.0-previ... 12 3/26/2023
16.2.0-previ... 7 3/25/2023
16.2.0-previ... 173 3/19/2023
16.2.0-previ... 29 3/7/2023
16.2.0-previ... 11 3/4/2023
16.1.0 175,785 2/28/2023
16.1.0-previ... 7 2/28/2023
16.1.0-previ... 10 2/25/2023
16.1.0-previ... 10 2/24/2023
16.1.0-previ... 50 2/13/2023
16.1.0-previ... 30 2/12/2023
16.1.0-previ... 27 2/5/2023
16.1.0-previ... 14 2/1/2023
16.1.0-previ... 31 1/25/2023
16.1.0-previ... 10 1/24/2023
16.1.0-previ... 7 1/24/2023
16.1.0-previ... 14 1/22/2023
16.1.0-previ... 347 1/4/2023
16.1.0-previ... 8 1/3/2023
16.1.0-previ... 17 12/26/2022
16.1.0-previ... 52 12/19/2022
16.1.0-previ... 15 12/17/2022
16.1.0-previ... 117 12/11/2022
16.1.0-previ... 16 12/4/2022
16.1.0-previ... 39 11/26/2022
16.1.0-previ... 14 11/24/2022
16.0.1-previ... 33 11/11/2022
16.0.0 828,394 9/9/2022
16.0.0-previ... 31 8/21/2022
16.0.0-previ... 26 8/13/2022
16.0.0-previ... 18 8/13/2022
16.0.0-previ... 27 8/1/2022
16.0.0-previ... 84 6/14/2022
16.0.0-previ... 27 6/8/2022
16.0.0-previ... 19 6/6/2022
16.0.0-previ... 16 6/6/2022
16.0.0-previ... 92 4/26/2022
16.0.0-previ... 46 3/28/2022
16.0.0-previ... 68 2/12/2022
15.2.0 2,685,729 9/1/2021
15.2.0-previ... 20 9/1/2021
15.2.0-previ... 46 7/23/2021
15.2.0-previ... 77 6/6/2021
15.2.0-previ... 70 4/18/2021
15.2.0-previ... 88 3/12/2021
15.1.1 1,445,711 2/12/2021
15.1.1-previ... 20 2/12/2021
15.1.0 62,663 2/2/2021
15.1.0-previ... 27 2/1/2021
15.1.0-previ... 22 1/31/2021
15.0.2-previ... 21 1/30/2021
15.0.2-previ... 27 1/24/2021
15.0.2-previ... 66 1/21/2021
15.0.2-previ... 65 1/12/2021
15.0.1 143,081 1/9/2021
15.0.1-previ... 62 1/9/2021
15.0.1-previ... 67 1/6/2021
15.0.1-previ... 63 1/6/2021
15.0.1-previ... 72 12/27/2020
15.0.1-previ... 64 12/26/2020
15.0.1-previ... 66 12/23/2020
15.0.1-previ... 73 12/14/2020
15.0.1-previ... 65 12/13/2020
15.0.1-previ... 64 12/12/2020
15.0.1-previ... 64 12/10/2020
15.0.0 214,908 12/6/2020
15.0.0-previ... 64 12/6/2020
15.0.0-previ... 69 11/25/2020
15.0.0-previ... 61 11/22/2020
15.0.0-previ... 64 11/21/2020
14.3.0-previ... 102 10/5/2020
14.3.0-previ... 57 10/3/2020
14.3.0-previ... 64 10/2/2020
14.2.2-previ... 108 8/19/2020
14.2.2-previ... 65 8/16/2020
14.2.1 649,627 8/14/2020
14.2.1-previ... 62 8/13/2020
14.2.1-previ... 64 8/11/2020
14.2.1-previ... 60 8/11/2020
14.2.1-previ... 76 7/31/2020
14.2.1-previ... 63 7/28/2020
14.2.0 72,790 7/23/2020
14.2.0-previ... 66 7/23/2020
14.2.0-previ... 68 7/19/2020
14.2.0-previ... 77 7/13/2020
14.2.0-previ... 68 7/10/2020
14.2.0-previ... 65 7/9/2020
14.1.1-previ... 66 7/9/2020
14.1.0 221,834 7/6/2020
14.1.0-previ... 372 7/5/2020
14.1.0-previ... 64 7/4/2020
14.1.0-previ... 65 7/4/2020
14.1.0-previ... 66 7/3/2020
14.1.0-previ... 69 7/1/2020
14.0.1-previ... 75 6/28/2020
14.0.1-previ... 65 6/26/2020
14.0.0 10,853 6/12/2020
14.0.0-previ... 66 6/12/2020
14.0.0-previ... 71 6/11/2020
14.0.0-previ... 74 6/10/2020
14.0.0-previ... 73 6/10/2020
14.0.0-previ... 106 5/28/2020
14.0.0-previ... 80 5/25/2020
14.0.0-previ... 72 5/25/2020
14.0.0-previ... 83 5/19/2020
14.0.0-previ... 79 5/19/2020
14.0.0-previ... 85 5/17/2020
14.0.0-previ... 74 5/17/2020
14.0.0-previ... 72 5/16/2020
14.0.0-previ... 73 5/14/2020
14.0.0-previ... 75 5/13/2020
14.0.0-previ... 82 5/12/2020
14.0.0-previ... 72 5/12/2020
14.0.0-previ... 73 5/12/2020
14.0.0-previ... 86 5/8/2020
14.0.0-previ... 71 5/6/2020
14.0.0-previ... 77 5/5/2020
14.0.0-previ... 73 5/4/2020
14.0.0-previ... 73 5/3/2020
14.0.0-previ... 72 5/3/2020
14.0.0-previ... 86 4/27/2020
14.0.0-previ... 82 4/26/2020
13.5.0 28,494 4/12/2020
13.5.0-previ... 79 4/11/2020
13.5.0-previ... 82 4/11/2020
13.4.1-previ... 108 3/31/2020
13.4.0 122,355 3/18/2020
13.4.0-previ... 76 3/18/2020
13.3.1-previ... 120 1/18/2020
13.3.0 481,321 1/17/2020
13.3.0-previ... 78 1/17/2020
13.3.0-previ... 82 1/12/2020
13.3.0-previ... 77 1/8/2020
13.3.0-previ... 78 1/7/2020
13.3.0-previ... 77 1/3/2020
13.3.0-previ... 77 1/2/2020
13.3.0-previ... 78 1/2/2020
13.2.0.0 862,996 9/19/2019
13.1.0.0 35,049 8/8/2019
13.0.0.0 26,093 6/26/2019
12.5.0.0 17,600 5/15/2019
12.4.0.0 21,802 4/3/2019
12.3.0.0 40,237 2/20/2019
12.2.0.0 9,112 1/10/2019
12.1.0.0 23,367 10/25/2018
12.0.0.0 21,450 9/5/2018
11.4.0.0 16,163 7/25/2018
11.3.0.0 7,393 6/13/2018
11.2.0.0 5,640 5/2/2018
11.1.0.0 6,261 3/22/2018
11.0.0.0 13,552 2/8/2018
10.0.0.0 3,655 12/14/2017
Show more