microsoft / SQLServerPSModule

This repo is the home of SQL Server PowerShell Module development.
MIT License
51 stars 1 forks source link

Error when importing PowerShell SQL Server module version 22.1.1 to Azure Automation #54

Closed jgador closed 10 months ago

jgador commented 1 year ago

When attempting to import the PowerShell SQL Server module version 22.1.1 with runtime version 5.1 into Azure Automation, the following error is encountered:

Invoke-Sqlcmd : Method not found: 'Void Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncrypti onAzureKeyVaultProvider..ctor(Azure.Core.TokenCredential)'. At line:26 char:1 + Invoke-Sqlcmd -ConnectionString $ConnectionString -Query $SqlCommand ... + ~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidResult: (:) [Invoke-Sqlcmd], MissingMethodException + FullyQualifiedErrorId : ExecutionFailed,Microsoft.SqlServer.Management.PowerShell.GetScriptCommand

I had no problem when using the version 21.1.18256

Matteo-T commented 10 months ago

Looks like a duplicate of #65