Jun 12, 2026, 8:24 AM

This commit is contained in:
Paweł Domański
2026-06-12 06:24:00 +00:00
parent a907e0f12a
commit b9ce30d67d
+9
View File
@@ -16,6 +16,15 @@ function Import-DBAToolBoxDependencies {
if (-not (Get-Module dbatools)) { if (-not (Get-Module dbatools)) {
Import-Module dbatools -ErrorAction Stop Import-Module dbatools -ErrorAction Stop
} }
# Configure dbatools to trust server certificates to prevent SSL/TLS certificate name mismatch / untrusted chain issues
try {
if (Get-Command Set-DbatoolsConfig -ErrorAction SilentlyContinue) {
Set-DbatoolsConfig -FullName 'sql.connection.trustcert' -Value $true -ErrorAction SilentlyContinue
}
} catch {
# Fallback if configuration cmdlet is not available
}
} }
function Test-SQLConnection { function Test-SQLConnection {