line 149 and 152 when Open-PostGreConnection is called. The new version of Open-PostGreConnection needs a Credential Parameter instead of Username and Password (OpenPostGreConnection.vb), therefore you get a ParameterBindingException and then the cmdlet uses exit !!!! I highly recommend to rethrow the exception instead of closing the powershell session!
Issue script & Debug output
Can't paste because the powershell host quits ...
Environment data
Name Value
---- -----
PSVersion 7.4.3
PSEdition Core
GitCommitId 7.4.3
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Description
If we run the cmdlet
Test-AzPostgreSqlFlexibleServerConnect -ResourceGroupName $serverResourceGroupName -Name $serverName -DatabaseName $databaseName -AdministratorUserName $aadAdministratorName -AdministratorLoginPassword $secureToken -ErrorAction Stop -QueryText $script
The PowerShell host quits when the new version of needed PowerShell Module SimplySQL is installed, with version prior to 2.x the cmdlet works fine.
The issue occurs within file
src/PostgreSql/PostgreSql.Autorest/custom/Test-AzPostgreSqlFlexibleServerConnect.ps1
line 149 and 152 when Open-PostGreConnection is called. The new version of Open-PostGreConnection needs a Credential Parameter instead of Username and Password (OpenPostGreConnection.vb), therefore you get a ParameterBindingException and then the cmdlet uses exit !!!! I highly recommend to rethrow the exception instead of closing the powershell session!
Issue script & Debug output
Environment data
Module versions
Error output