-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-AzPostgreSqlServer module issues #19273
Comments
@DevonK3 could you double check that current account has permission to access that subscription? You can turn on debug message |
Yes. I am the Subscription Owner. I also verified my other Subscription Owner had the same issue. |
PS /Users/devonkelly> Get-AzPostgreSqlServer HTTP Method: Absolute Uri: Headers: Body: DEBUG: BeforeCall: Status Code: Headers: Body: DEBUG: ResponseCreated: Name Account SubscriptionName Environment TenantId aa-ba-prod-spoke [redactedp aa-ba-prod-spoke AzureCloud [redacted] |
@DevonK3 you also can use |
Correct. But to use
|
@DevonK3 , Let me involve PostgreSQL team. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @sunilagarwal, @lfittl-msft, @sr-msft, @niklarin. Issue DetailsDescriptionWhen running Get-AzPostgreSqlServer, it should return all of the Postgres SQL server names. When I run it in one subscription, it works. But when I run it against my Prod subscription, it doesn't return anything, even though they both have servers in them. Even if I use the optional -Subscription parameter, it doesn't work. Issue script & Debug outputPS> Get-AzPostgreSqlServer -SubscriptionId <NonProd SubId>
Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier SslEnforcement
---- -------- ------------------ ------- ----------------------- ------- ------- --------------
banrmprcarlflpgsql eastus airflow_admin 11 102400 GP_Gen5_4 GeneralPurpose Enabled
banorionairflowdb eastus azureadmin 11 102400 GP_Gen5_2 GeneralPurpose Enabled
===================
PS> Get-AzPostgreSqlServer -SubscriptionId <Prod SubId>
PS>
====================
For the same Prod Subscription ...
PS> Get-AzPostgreSqlConfiguration -ServerName baporionairflowdb -ResourceGroupName <rgname>
Name Value AllowedValue
---- ----- ------------
array_nulls on on,off
backslash_quote safe_encoding safe_encoding,on,off
bytea_output hex escape,hex
check_function_bodies on on,off
(redacted) Environment dataName Value
---- -----
PSVersion 7.2.6
PSEdition Core
GitCommitId 7.2.6
OS Darwin 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0 Module versionsModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.9.1 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 1.1.0 Az.PostgreSql {Get-AzPostgreSqlConfiguration, Get-AzPostgreSqlConnectionString, Get-AzPostgreSqlFirewallRule, Get-AzPo…
Script 4.2.0 Az.Resources {Add-AzADGroupMember, Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzADAppCredential…} Error outputWARNING: Upcoming breaking changes in the cmdlet 'Resolve-AzError' :
The `Resolve-Error` alias will be removed in a future release. Please change any scripts that use this alias to use `Resolve-AzError` instead.
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.
HistoryId: 28
Message : The term 'Get-AzModule' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
StackTrace : at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions
searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context)
at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandOrigin commandOrigin, ExecutionContext context)
at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandOrigin commandOrigin)
at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope)
at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource)
at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst,
CommandRedirection[] redirections, ExecutionContext context)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[]
pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception : System.Management.Automation.CommandNotFoundException
InvocationInfo : {}
Line : Get-AzModule Az*
Position : At line:1 char:1
+ Get-AzModule Az*
+ ~~~~~~~~~~~~
HistoryId : 28
HistoryId: -1
Message : Method invocation failed because [Microsoft.Azure.PowerShell.Cmdlets.PostgreSql.Models.Api20171201.Configuration] does not contain a method named 'Sort'.
StackTrace : at System.Management.Automation.EnumerableOps.MethodInvokerWorker(CallSite invokeMemberSite, IEnumerator enumerator, Object[] args, ExecutionContext
context, List`1 result, Boolean& foundMethod)
at System.Management.Automation.EnumerableOps.MethodInvoker(PSInvokeMemberBinder binder, Type delegateType, IEnumerator enumerator, Object[] args, Type
typeForMessage)
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line : $sqcf.Sort()
Position : At line:1 char:1
+ $sqcf.Sort()
+ ~~~~~~~~~~~~
HistoryId : -1
The Azure PowerShell team is listening, please let us know how we are doing: https://aka.ms/azpssurvey?Q_CHL=ERROR.
|
Confirmed. Get-AzPostgreSqlServer shows all "Azure Database for PostgreSQL single server" instances in both Subscriptions. |
12.0.0 Az |
Description
When running Get-AzPostgreSqlServer, it should return all of the Postgres SQL server names. When I run it in one subscription, it works. But when I run it against my Prod subscription, it doesn't return anything, even though they both have servers in them. Even if I use the optional -Subscription parameter, it doesn't work.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: