New SMO Library and Certificate Trust #7680
Replies: 2 comments 2 replies
-
or, stop using netbios names ^_^ .
all things considered it's a good thing MS did by forcing good behaviour to everybody. And yes, I'm partial to this because for the longest time I've been the only guy in #dbatools that needed to type the FQDN every time, but that's another story ^_^ |
Beta Was this translation helpful? Give feedback.
-
What about using a wild card certificate? I imported the cert and configured it as the ssl cert to user for sql server using the following code
however any time i try and use any dbatools command like Get-DbaConnection -SqlInstance $SqlInstance i get an error such as WARNING: [16:34:38][Get-DbaConnection] Failure | The target principal name is incorrect |
Beta Was this translation helpful? Give feedback.
-
Now that we're using the new SMO library, you may encounter an error "The target principal name is incorrect" or "The certificate chain was issued by an authority that is not trusted" or "The received certificate has expired"
This is new and expected behavior if you are using encryption but not using a hostname in your certificate or your certificate chain is not trusted.
From red gate docs:
From our docs:
To resolve this issue, you can:
Set-DbatoolsConfig -FullName 'sql.connection.trustcert' -Value $true -Register
If this doesn't work for you, first, let us know in this issue and second, please check your Kerberos settings using
Test-DbaSpn
and set them as necessary. The new SMO library, which will eventually be part of SQL Server Management Studio, seems to be a bit more strict about Kerberos as well.Beta Was this translation helpful? Give feedback.
All reactions