Vault - EVD Invoke-SQLCmd fails with: "SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted"
Symptom
When launching EVD the following error message raises:
Invoke-SqlCmd : A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
At <Drive>:\ExportVaultData\CAMSSQLImport.ps1:65 char:4
+ Invoke-SqlCmd -ServerInstance $args[2] -Query $query -Err ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Invoke-Sqlcmd], SqlException
+ FullyQualifiedErrorId : SqlExceptionError,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand
Environment
12.6;13.0;13.2;14.0;14.2 Privileged Access Manager (PAM, self-hosted) Export Vault Data
PAS 12.6 and above
EVD exporting data from the vault to MSSQL.
Cause
By default, the script Invoke-SQLCmd does not trust the self-signed certificates.
Resolution
To trust the self-signed certificate, the parameter -TrustServerCertificate has to be added when calling Invoke-SqlCmd.
For instance:
Invoke-SqlCmd -TrustServerCertificate -ServerInstance .........
For more related information please refer to the following article: