Jun 12, 2026, 8:24 AM
This commit is contained in:
@@ -16,6 +16,15 @@ function Import-DBAToolBoxDependencies {
|
||||
if (-not (Get-Module dbatools)) {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user