Add -TrustServerCertificate to fix the following error:
Line |
115 | … rverName = (Invoke-SqlCmd -ServerInstance $serverInstance -Credential …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| A connection was successfully established with the server, but then an
| error occurred during the pre-login handshake. (provider: TCP Provider,
| error: 35 - An internal exception was caught)
Invoke-Sqlcmd: /opt/mssql/bin/runassessment.ps1:115
Line |
115 | … rverName = (Invoke-SqlCmd -ServerInstance $serverInstance -Credential …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Incorrect syntax was encountered while parsing ''.
Make password readonly
Get-SqlInstance: /opt/mssql/bin/runassessment.ps1:123
Line |
123 | Get-SqlInstance -ServerInstance $serverInstance -Credential $cred …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| password must be marked as read only.