Module with DSC Resources for deployment and configuration of Microsoft SQL Server.

Minimum PowerShell version


Installation Options

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

Install-Module -Name xSQLServer -RequiredVersion

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


Microsoft Corporation


(c) 2014 Microsoft Corporation. All rights reserved.



DesiredStateConfiguration DSC DSCResourceKit DSCResource


xSQLAOGroupEnsure xSQLAOGroupJoin xSQLDatabaseRecoveryModel xSQLServerAlias xSQLServerAlwaysOnService xSQLServerAvailabilityGroupListener xSQLServerConfiguration xSQLServerDatabase xSQLServerDatabaseOwner xSQLServerDatabasePermissions xSQLServerDatabaseRole xSQLServerEndpoint xSQLServerEndpointPermission xSQLServerEndpointState xSQLServerFailoverClusterSetup xSQLServerFirewall xSQLServerLogin xSQLServerMaxDop xSQLServerMemory xSQLServerNetwork xSQLServerPermission xSQLServerReplication xSQLServerRole xSQLServerRSConfig xSQLServerRSSecureConnectionLevel xSQLServerScript xSQLServerSetup xWaitForAvailabilityGroup


This module has no dependencies.

Release Notes

- Fixes in xSQLServerConfiguration
 - Added support for clustered SQL instances
 - BREAKING CHANGE: Updated parameters to align with other resources (SQLServer / SQLInstanceName)
 - Updated code to utilize CIM rather than WMI
- Added tests for resources
 - xSQLServerConfiguration
 - xSQLServerSetup
 - xSQLServerDatabaseRole
 - xSQLAOGroupJoin
 - xSQLServerHelper and moved the existing tests for Restart-SqlService to it.
 - xSQLServerAlwaysOnService
- Fixes in xSQLAOGroupJoin
 - Availability Group name now appears in the error message for a failed Availability Group join attempt.
 - Get-TargetResource now works with Get-DscConfiguration
- Fixes in xSQLServerRole
 - Updated Ensure parameter to "Present" default value
 - Renamed helper functions *-SqlServerRole to *-SqlServerRoleMember
- Changes to xSQLAlias
 - Add UseDynamicTcpPort parameter for option "Dynamically determine port"
 - Change Get-WmiObject to Get-CimInstance in Resource and associated pester file
- Added CHANGELOG.md file
- Added issue template file (ISSUE_TEMPLATE.md) for "New Issue" and pull request template file (PULL_REQUEST_TEMPLATE.md) for "New Pull Request"
- Add Contributing.md file
- Changes to xSQLServerSetup
 - Now `Features` parameter is case-insensitive.
- BREAKING CHANGE: Removed xSQLServerPowerPlan from this module. The resource has been moved to [xComputerManagement](https://github.com/PowerShell/xComputerManagement) and is now called xPowerPlan.
- Changes and enhancements in xSQLServerDatabaseRole
 - BREAKING CHANGE: Fixed so the same user can now be added to a role in one or more databases, and/or one or more instances. Now the parameters `SQLServer` and `SQLInstanceName` are mandatory.
 - Enhanced so the same user can now be added to more than one role
- BREAKING CHANGE: Renamed xSQLAlias to xSQLServerAlias to align w�th naming convention.
- Changes to xSQLServerAlwaysOnService
 - Added RestartTimeout parameter
 - Fixed bug where the SQL Agent service did not get restarted after the IsHadrEnabled property was set.
 - BREAKING CHANGE: The mandatory parameters now include Ensure, SQLServer, and SQLInstanceName. SQLServer and SQLInstanceName are keys which will be used to uniquely identify the resource which allows AlwaysOn to be enabled on multiple instances on the same machine.
- Moved Restart-SqlService from MSFT_xSQLServerConfiguration.psm1 to xSQLServerHelper.psm1.

Version History

Version Downloads Last updated 147,351 1/24/2018 7,137 11/15/2017 5,290 10/5/2017 5,525 8/23/2017 5,188 7/12/2017 6,239 5/31/2017 8,212 4/19/2017 10,736 3/8/2017 2,540 1/26/2017 (current version) 2,314 12/14/2016 1,872 11/2/2016 7,380 9/21/2016 25,766 8/10/2016 2,183 6/29/2016 1,233 5/18/2016 998 3/31/2016 1,583 2/3/2016 2,159 5/2/2015 480 2/19/2015 65 12/18/2014 73 10/24/2014
Show less