Commit e4571e9
Connect-DbaInstance - Trust server certificate for localhost DAC connections
When using DedicatedAdminConnection with a localhost instance, the server name
is changed to 'ADMIN:localhost' to avoid multi-IP resolution issues (#10151).
However, if TLS encryption is enabled, the SQL Server certificate (issued to the
FQDN, e.g., 'r9d9.pup.local') doesn't match 'localhost', causing the error
'The target principal name is incorrect' (#10254).
Automatically set TrustServerCertificate=true when connecting via DAC to
localhost, since the hostname mismatch is expected and acceptable in this context.
Applies to both the String input path and the Server/copyContext path.
(do *Connect*)
Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>1 parent 2323952 commit e4571e9
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
| 651 | + | |
| 652 | + | |
651 | 653 | | |
652 | 654 | | |
653 | 655 | | |
| |||
721 | 723 | | |
722 | 724 | | |
723 | 725 | | |
| 726 | + | |
| 727 | + | |
724 | 728 | | |
725 | 729 | | |
726 | 730 | | |
| |||
0 commit comments