We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
DSC resource works and configures certificate but it won't show in Configuration manager if the certificate thumbprint is upper case.
PowerShell command returns thumbprint upper-case: (Get-ChildItem cert:\LocalMachine\my | ? FriendlyName -eq "SQL Certificate" | Select-Object -Property Thumbprint).Thumbprint
Either document that lower case is required, or force thumbprint lower
[string]$CertificateThumbprint = (Get-ChildItem cert:\LocalMachine\my | ? FriendlyName -eq "SQL Certificate" | Select-Object -Property Thumbprint).Thumbprint $SqlServices = Get-DbaService -Type Engine | Where { $_.State -ieq "Running" } foreach ($srv in $SqlServices) { if ($srv.StartName -ieq "LocalSystem") { $ServiceAccount = "NT AUTHORITY\SYSTEM" } else { $ServiceAccount = $srv.StartName } $Params = @{ InstanceName = $srv.InstanceName Thumbprint = $CertificateThumbprint ForceEncryption = $false Ensure = 'Present' ServiceAccount = $ServiceAccount } if (Invoke-DscResource -ModuleName SqlServerDsc -Name SqlServerSecureConnection -Property $Params -Method Test) { Write-Host "Skipping SqlServerSecureConnection... Instance already configured: $($srv.InstanceName)" } else { Write-Host "Configuring SqlServerSecureConnection... Instance: $($srv.InstanceName)" Invoke-DscResource -ModuleName SqlServerDsc -Name SqlServerSecureConnection -Property $Params -Method Set -Verbose } }
The text was updated successfully, but these errors were encountered:
SqlServerSecureConnection: Fix issue #1350 (#1376)
728a1cf
- Changes to SqlServerSecureConnection - Forced $Thumbprint to lowercase to fix issue #1350
Successfully merging a pull request may close this issue.
Details of the scenario you tried and the problem that is occurring
DSC resource works and configures certificate but it won't show in Configuration manager if the certificate thumbprint is upper case.
PowerShell command returns thumbprint upper-case:
(Get-ChildItem cert:\LocalMachine\my | ? FriendlyName -eq "SQL Certificate" | Select-Object -Property Thumbprint).Thumbprint
Suggested solution to the issue
Either document that lower case is required, or force thumbprint lower
The DSC configuration that is used to reproduce the issue (as detailed as possible)
The text was updated successfully, but these errors were encountered: