ctigeek / InvokeQueryPowershellModule

A Powershell module of Cmdlets for querying most types of databases.
https://www.powershellgallery.com/packages/InvokeQuery
MIT License
58 stars 10 forks source link

Authentication method not supported (Received: 10) #23

Open amarco opened 1 year ago

amarco commented 1 year ago

We are trying to access a postgress database from powershell (7.3) as follows: $server= $db = $table = $user= $pwd= $connectionString = "Host=$server;Username=$user;Password=$pwd;Database=$db"; $query ="select * from $table" $results = Invoke-PostgreSqlQuery -ConnectionString $connectionString -sql $query -Verbose

We end up with the following: VERBOSE: Using the following connection string: Host=;Username=xxxxxxxxxx;Password=xxxxxxxxxx;Database= VERBOSE: Opening connection. VERBOSE: Processed 0 queries in 5 milliseconds. VERBOSE: Complete. Invoke-PostgreSqlQuery: \test6.ps1:11:12 Line | 11 | $results = Invoke-PostgreSqlQuery -ConnectionString $connectionString … | ~~~~~~~~~~~~~~ | Authentication method not supported (Received: 10)

Does anyone know how to get past this error. We are using postrgess 13.10

Thanks in advance

amarco commented 1 year ago

I was able to solve the problem by updating the Npgsql.dll to version 4.0.4.0. You might consider releasing an update to include the newer version. Fyi this I did not use the latest version I just went to version 4 as the latest is v7 and am not what new problems that might introduce

amarco commented 1 year ago

Not sure I understand your question? I merely copied over the old dll's with newer dll's.

From: gabriele @.> Sent: Wednesday, April 26, 2023 3:56 AM To: ctigeek/InvokeQueryPowershellModule @.> Cc: Marco Accardo @.>; Mention @.> Subject: Re: [ctigeek/InvokeQueryPowershellModule] Authentication method not supported (Received: 10) (Issue #23)

@amarcohttps://github.com/amarco can you tell me how to do that? please

- Reply to this email directly, view it on GitHubhttps://github.com/ctigeek/InvokeQueryPowershellModule/issues/23#issuecomment-1522952121, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAP7VX62ZY2RVZSMM4OACQ3XDDIIRANCNFSM6AAAAAAW6OQH6A. You are receiving this because you were mentioned.Message ID: @.**@.>>


RWDI - A Platinum Member of Canada's 50 Best Managed Companies This communication is intended for the sole use of the party to whom it was addressed and may contain information that is privileged and/or confidential. Any other distribution, copying or disclosure is strictly prohibited. If you received this email in error, please notify us immediately by replying to this email and delete the message without retaining any hard or electronic copies of same. Outgoing emails are scanned for viruses, but no warranty is made to their absence in this email or attachments. If you require any information supplied by RWDI in a different format to facilitate accessibility, contact the sender of the email, email @.*** or call +1.519.823.1311. Please be aware that when you contact us with a business query we may collect and use your details for future communications.


Bahikka commented 7 months ago

I was able to solve the problem by updating the Npgsql.dll to version 4.0.4.0. You might consider releasing an update to include the newer version. Fyi this I did not use the latest version I just went to version 4 as the latest is v7 and am not what new problems that might introduce

One more on this, according to https://github.com/DbUp/DbUp/issues/545#issuecomment-1019352782 the minimal version needs to be 3.2.7