-
Notifications
You must be signed in to change notification settings - Fork 224
Home
SqlServerDsc v17.0.1-preview0003
Here you will find all the information you need to make use of the SqlServerDsc DSC resources in the latest release. This includes details of the resources that are available, current capabilities, known issues, and information to help plan a DSC based implementation of SqlServerDsc.
Please leave comments, feature requests, and bug reports for this module in the issues section for this repository.
The documentation, examples, unit test, and integration tests have been removed for these deprecated resources. These resources will be removed in a future release.
No resources are currently deprecated.
To get started either:
- Install from the PowerShell Gallery using PowerShellGet by running the following command:
Install-Module -Name SqlServerDsc -Repository PSGallery
- Download SqlServerDsc from the PowerShell Gallery
and then unzip it to one of your PowerShell modules folders (such as
$env:ProgramFiles\WindowsPowerShell\Modules
).
To confirm installation, run the below command and ensure you see the SqlServerDsc DSC resources available:
Get-DscResource -Module SqlServerDsc
- Familiarity with Powershell DSC Framework
- Powershell 5.0 or higher
- PowerShell module containing SMO assemblies (optional)
- For example the SqlServer PowerShell module or the dbatools PowerShell module.
SqlServerDSC implements configuration management for Microsoft SQL Server using the Powershell DSC technology developed by Microsoft. A community maintains resources that can be used by configuration automation tools from various companies.
It is recommended to use Windows Management Framework (PowerShell) version 5.1.
The minimum Windows Management Framework (PowerShell) version required is 5.0, which ships with Windows 10 or Windows Server 2016, but can also be installed on Windows 7 SP1, Windows 8.1, Windows Server 2012, and Windows Server 2012 R2.
These resource might not work on PowerShell 7.x because they depend on SQL Server modules which only works in PowerShell 5.x.
There are two options, installing the SqlServer PowerShell module or the dbatools PowerShell module.
If the SqlServer module is present it will be used instead of SQLPS automatically.
To use the dbatools
module as a replacement for SQLPS the environment variable SMODefaultModuleName
must be set to the value dbatools
. This environment variable can be set
machine-wide, or at minimum set for each user that runs DSC resources, on
the target node. Make sure you comply with any license terms that is part
of dbatools.
Tip
It is also possible to use any module as a preferred module if
its name is set as the value of the environment variable SMODefaultModuleName
.
A full list of changes in each version can be found in the change log.
- Add-SqlDscNode
- Add-SqlDscTraceFlag
- Complete-SqlDscFailoverCluster
- Complete-SqlDscImage
- Connect-SqlDscDatabaseEngine
- ConvertFrom-SqlDscDatabasePermission
- ConvertFrom-SqlDscServerPermission
- ConvertTo-SqlDscDatabasePermission
- ConvertTo-SqlDscServerPermission
- Disable-SqlDscAudit
- Disconnect-SqlDscDatabaseEngine
- Enable-SqlDscAudit
- Get-SqlDscAudit
- Get-SqlDscConfigurationOption
- Get-SqlDscDatabasePermission
- Get-SqlDscManagedComputer
- Get-SqlDscManagedComputerService
- Get-SqlDscPreferredModule
- Get-SqlDscServerPermission
- Get-SqlDscStartupParameter
- Get-SqlDscTraceFlag
- Import-SqlDscPreferredModule
- Initialize-SqlDscRebuildDatabase
- Install-SqlDscServer
- Invoke-SqlDscQuery
- New-SqlDscAudit
- Remove-SqlDscAudit
- Remove-SqlDscNode
- Remove-SqlDscTraceFlag
- Repair-SqlDscServer
- Save-SqlDscSqlServerMediaFile
- Set-SqlDscAudit
- Set-SqlDscDatabasePermission
- Set-SqlDscServerPermission
- Set-SqlDscStartupParameter
- Set-SqlDscTraceFlag
- Test-SqlDscIsDatabasePrincipal
- Test-SqlDscIsLogin
- Test-SqlDscIsSupportedFeature
- Uninstall-SqlDscServer
- SqlAG
- SqlAGDatabase
- SqlAgentAlert
- SqlAgentFailsafe
- SqlAgentOperator
- SqlAGListener
- SqlAGReplica
- SqlAlias
- SqlAlwaysOnService
- SqlAudit
- SqlConfiguration
- SqlDatabase
- SqlDatabaseDefaultLocation
- SqlDatabaseMail
- SqlDatabaseObjectPermission
- SqlDatabasePermission
- SqlDatabaseRole
- SqlDatabaseUser
- SqlEndpoint
- SqlEndpointPermission
- SqlLogin
- SqlMaxDop
- SqlMemory
- SqlPermission
- SqlProtocol
- SqlProtocolTcpIp
- SqlReplication
- SqlRole
- SqlRS
- SqlRSSetup
- SqlScript
- SqlScriptQuery
- SqlSecureConnection
- SqlServiceAccount
- SqlSetup
- SqlTraceFlag
- SqlWaitForAG
- SqlWindowsFirewall