Skip to content

Get-AzSqlserver does not return .Id and .Name parameters (as most Az modules do) #28270

@hkelley

Description

@hkelley

Description

Most AZ cmdlets/types return Id and Name properties. It would be helpful if the Az.Sql do the same (instead of,or in addition to ResourceId and ResourceName)

Issue script & Debug output

SQL

Get-AzSqlserver -ResourceGroupName $rg  | Select-Object -First 1 | Get-Member

   TypeName: Microsoft.Azure.Commands.Sql.Server.Model.AzureSqlServerModel

Name                          MemberType Definition
----                          ---------- ----------
Equals                        Method     bool Equals(System.Object obj)
GetHashCode                   Method     int GetHashCode()
GetType                       Method     type GetType()
ToString                      Method     string ToString()
Administrators                Property   Microsoft.Azure.Management.Sql.Models.ServerExternalAdministrator Administrat…
FederatedClientId             Property   System.Nullable[guid] FederatedClientId {get;set;}
FullyQualifiedDomainName      Property   string FullyQualifiedDomainName {get;set;}
Identity                      Property   Microsoft.Azure.Management.Sql.Models.ResourceIdentity Identity {get;set;}
KeyId                         Property   string KeyId {get;set;}
Location                      Property   string Location {get;set;}
MinimalTlsVersion             Property   string MinimalTlsVersion {get;set;}
PrimaryUserAssignedIdentityId Property   string PrimaryUserAssignedIdentityId {get;set;}
PublicNetworkAccess           Property   string PublicNetworkAccess {get;set;}
ResourceGroupName             Property   string ResourceGroupName {get;set;}
ResourceId                    Property   string ResourceId {get;set;}
RestrictOutboundNetworkAccess Property   string RestrictOutboundNetworkAccess {get;set;}
ServerName                    Property   string ServerName {get;set;}
ServerVersion                 Property   string ServerVersion {get;set;}
SqlAdministratorLogin         Property   string SqlAdministratorLogin {get;set;}
SqlAdministratorPassword      Property   securestring SqlAdministratorPassword {get;set;}
Tags                          Property   System.Collections.Generic.Dictionary[string,string] Tags {get;set;}

App gateway, for example:

Get-AzApplicationGateway -ResourceGroupName $rg  | Select-Object -First 1 | Get-Member

   TypeName: Microsoft.Azure.Commands.Network.Models.PSApplicationGateway

Name                                MemberType Definition
----                                ---------- ----------
Equals                              Method     bool Equals(System.Object obj)
GetHashCode                         Method     int GetHashCode()
GetType                             Method     type GetType()
ToString                            Method     string ToString()
AuthenticationCertificates          Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsAuthenticationCertificatesText      Property   string AuthenticationCertificatesText {get;}
AutoscaleConfiguration              Property   Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayAutoscaleCoBackendAddressPools                 Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsBackendAddressPoolsText             Property   string BackendAddressPoolsText {get;}
BackendHttpSettingsCollection       Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsBackendHttpSettingsCollectionText   Property   string BackendHttpSettingsCollectionText {get;}
BackendSettingsCollection           Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsBackendSettingsCollectionText       Property   string BackendSettingsCollectionText {get;}
CustomErrorConfigurations           Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsDefaultPredefinedSslPolicy          Property   string DefaultPredefinedSslPolicy {get;}
EnableFips                          Property   System.Nullable[bool] EnableFips {get;set;}
EnableHttp2                         Property   System.Nullable[bool] EnableHttp2 {get;set;}
EnableRequestBuffering              Property   System.Nullable[bool] EnableRequestBuffering {get;set;}
EnableResponseBuffering             Property   System.Nullable[bool] EnableResponseBuffering {get;set;}
Etag                                Property   string Etag {get;set;}
FirewallPolicy                      Property   Microsoft.Azure.Commands.Network.Models.PSResourceId FirewallPolicy {ge…
FirewallPolicyText                  Property   string FirewallPolicyText {get;}
ForceFirewallPolicyAssociation      Property   System.Nullable[bool] ForceFirewallPolicyAssociation {get;set;}
FrontendIPConfigurations            Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsFrontendIpConfigurationsText        Property   string FrontendIpConfigurationsText {get;}
FrontendPorts                       Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsFrontendPortsText                   Property   string FrontendPortsText {get;}
GatewayIPConfigurations             Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsGatewayIpConfigurationsText         Property   string GatewayIpConfigurationsText {get;}
GlobalConfiguration                 Property   Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayGlobalConfiHttpListeners                       Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsHttpListenersText                   Property   string HttpListenersText {get;}
Id                                  Property   string Id {get;set;}
Identity                            Property   Microsoft.Azure.Commands.Network.Models.PSManagedServiceIdentity IdentiIdentityText                        Property   string IdentityText {get;}
Listeners                           Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsListenersText                       Property   string ListenersText {get;}
Location                            Property   string Location {get;set;}
Name                                Property   string Name {get;set;}
OperationalState                    Property   string OperationalState {get;}
PrivateEndpointConnections          Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsPrivateLinkConfigurations           Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsPrivateLinkConfigurationsText       Property   string PrivateLinkConfigurationsText {get;}
PrivateLinkEndpointConnectionsText  Property   string PrivateLinkEndpointConnectionsText {get;}
Probes                              Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsProbesText                          Property   string ProbesText {get;}
ProvisioningState                   Property   string ProvisioningState {get;set;}
RedirectConfigurations              Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsRequestRoutingRules                 Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsRequestRoutingRulesText             Property   string RequestRoutingRulesText {get;}
ResourceGroupName                   Property   string ResourceGroupName {get;set;}
ResourceGuid                        Property   string ResourceGuid {get;set;}
RewriteRuleSets                     Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsRewriteRuleSetsText                 Property   string RewriteRuleSetsText {get;}
RoutingRules                        Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsRoutingRulesText                    Property   string RoutingRulesText {get;}
Sku                                 Property   Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySku Sku {ge…
SslCertificates                     Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsSslCertificatesText                 Property   string SslCertificatesText {get;}
SslPolicy                           Property   Microsoft.Azure.Commands.Network.Models.PSApplicationGatewaySslPolicy SSslPolicyText                       Property   string SslPolicyText {get;}
SslProfiles                         Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsSslProfilesText                     Property   string SslProfilesText {get;}
Tag                                 Property   hashtable Tag {get;set;}
TagsTable                           Property   string TagsTable {get;}
TrustedClientCertificates           Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsTrustedClientCertificatesText       Property   string TrustedClientCertificatesText {get;}
TrustedRootCertificates             Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsType                                Property   string Type {get;set;}
UrlPathMaps                         Property   System.Collections.Generic.List[Microsoft.Azure.Commands.Network.ModelsUrlPathMapsText                     Property   string UrlPathMapsText {get;}
WebApplicationFirewallConfiguration Property   Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayWebApplicatZones                               Property   System.Collections.Generic.List[string] Zones {get;set;}

Environment data

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.5.2
PSEdition                      Core
GitCommitId                    7.5.2
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

Name              : Az.Sql
ModuleType        : Script
Version           : 6.0.4
PreRelease        : 
NestedModules     : {Microsoft.Azure.PowerShell.Cmdlets.Sql}
ExportedFunctions : 
ExportedCmdlets   : {Add-AzSqlDatabaseToFailoverGroup, Add-AzSqlElasticJobStep, Add-AzSqlElasticJobTarget, Add-AzSqlInstanceKeyVaultKey…}
ExportedVariables : 
ExportedAliases   : {Get-AzSqlDatabaseLongTermRetentionPolicy, Get-AzSqlInstanceTDEProtector, Set-AzSqlDatabaseLongTermRetentionPolicy, Set-AzSqlInstanceLink…}

Error output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedneeds-triageThis is a new issue that needs to be triaged to the appropriate team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions