0

I am new to powershell and dbatools and currently testing a script on an ec2 built-in Microsoft SQL Server 2022. This script should simply create full and differential backup jobs of all databases to a specified path and also pushes backups to a S3 bucket.

However when I run basic dbatools commands I get below warning and it won`t pull any databases.

WARNING: [Get-DbaDatabase] Failure | The certificate chain was issued by an authority that is not trusted

I`ve read setting "TrustServerCertificate" to True fixes the problem in the connection string, but how to bypass this issue when running on a script in powershell with dbatools as it throws an error when adding -TrustServerCertificate to any dbatools command.

jarlh
  • 42,561
  • 8
  • 45
  • 63
gklucard
  • 15
  • 6
  • You should really just install a proper certificate, either by paying a public CA for it, or through your private Enterprise CA. `TrustServerCertificate` is insecure – Charlieface Jun 05 '23 at 20:00

0 Answers0