-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SqlSetup: Missing Configuration Feature/Options : Network Configurations #1161
Comments
I solved the ability to Enable Named Pipes for the Server Protocol using the code snip below. I don't know if there is a proper way to load the assembly, but it seems to work in this scenario. I hope this can benefit someone who looking to include this functionality via DSC. Script 'EnableNamedPipes'
|
Thanks for the snippet, that would simplify for someone to add this, but I think it should be implemented in SqlServerNetwork (issue #14), since SqlSetup will just add the required arguments to SqlSetup. It will be up to SqlServerNetwork to make sure the settings is kept in desired state. A suggestion is that it should use |
Would enabling the setting of the "Force Encryption" flag be in scope for this issue? |
@NReilingh Not sure what force encryption flag you a referencing, but If SQL Server setup.exe can enable it, then yes it would be the scope for the SqlSetup resource, otherwise no - then it should be part of another resource. |
Hi @johlju, Enforced Encryption and Hide Instance are properties in the DB instances ietwork properties and found via SQL Server Configuration Manager, see sample code:- ## apply surface area configuration control 2.12
$WmiObject = @{
ComputerName = $SQLServer.NetName
Namespace = "root\Microsoft\SqlServer\ComputerManagement$($SQLServer.VersionMajor)"
Class = "ServerSettingsGeneralFlag"
Filter = "FlagName = 'HideInstance'"
}
$HideInstance = Get-WmiObject @WmiObject
if ($HideInstance.FlagValue -eq $false) {
Write-Verbose "Setting HideInstance to True."
$HideInstance.SetValue($true) | Out-Null
Write-Verbose "HideInstance set to True"
}
## apply surface area configuration control 8.2
$WmiObject = @{
ComputerName = $SQLServer.NetName
Namespace = "root\Microsoft\SqlServer\ComputerManagement$($SQLServer.VersionMajor)"
Class = "ServerSettingsGeneralFlag"
Filter = "FlagName = 'ForceEncryption'"
}
$ForceEncryption = Get-WmiObject @WmiObject
if ($ForceEncryption.FlagValue -eq $false) {
Write-Verbose "Setting ForceEncryption to True."
$ForceEncryption.SetValue($true) | Out-Null
Write-Verbose "ForceEncryption set to True"
}
Note $SQLServer is the SMO object However this would only be half a solution as some client may wish to apply the certificate with this option. |
Thanks for the information @SQLHorizons! The new resource https://github.com/PowerShell/SqlServerDsc#sqlserversecureconnection introduce |
The new resource SqlServerProtocol will solve this (currently in PR). But does not fix this issue to make SqlSetup support this. |
- SqlSetup - Added the properties `NpEnabled` and `TcpEnabled` (issue #1161).
Details of the scenario you tried and the problem that is occurring
This issue is created to bring some improvements to the SqlSetup DSC Configuration. The idea is to report all the missing options in the resource to be allow the installation of all the features and to use all the options available in the SQL Server installer.
Options to add to the DSC Resource :
/NPENABLED : Specifies the state of the Named Pipes protocol for the SQL Server service. Supported values:
/TCPENABLED : Specifies the state of the TCP protocol for the SQL Server service. Supported values:
The DSC configuration that is using the resource (as detailed as possible)
SqlSetup
Version of the operating system and PowerShell the target node is running
Windows Server 2012/2012R2/2016
SQL Server edition and version the target node is running
SQL Server 2012/2014/2016/2017
What SQL Server PowerShell modules, and which version, are present on the target node.
Most recent version
Version of the DSC module you're using, or write 'dev' if you're using current dev branch
Most recent version
The text was updated successfully, but these errors were encountered: