Edit

Get-AzPostgreSqlFlexibleServer

This cmdlet is part of a Preview module. Preview versions aren't recommended for use in production environments. For more information, see https://aka.ms/azps-refstatus.

Gets information about an existing server.

Syntax

List1 (Default)

Get-AzPostgreSqlFlexibleServer
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

Get-AzPostgreSqlFlexibleServer
    -Name <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

List

Get-AzPostgreSqlFlexibleServer
    -ResourceGroupName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentity

Get-AzPostgreSqlFlexibleServer
    -InputObject <IPostgreSqlFlexibleServerIdentity>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

Gets information about an existing server.

Examples

Example 1: List flexible servers in subscription explicitly specified

Get-AzPostgreSqlFlexibleServer -SubscriptionId aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e
Name                                     ResourceGroupName                        Location             SkuName              SkuTier         AdministratorLogin        StorageSizeGb
----                                     -----------------                        --------             -------              -------         ------------------        -------------
example-server-01                        example-resource-group-01                Australia East       Standard_D4ads_v5    GeneralPurpose  adminlogin01              128
example-server-02                        example-resource-group-02                Canada Central       Standard_D4ds_v4     GeneralPurpose  adminlogin02              32
example-server-03                        example-resource-group-03                Japan West           Standard_B1ms        Burstable       adminlogin03              64
example-server-04                        example-resource-group-01                Southeast Asia       Standard_D4ads_v5    GeneralPurpose  adminlogin04              4096
example-server-05                        example-resource-group-04                Central US           Standard_E2ds_v4     MemoryOptimized adminlogin05              128

Gets Azure Database for PostgreSQL flexible servers in subscription explicitly passed as an argument. If subscription is not passed explicitly, it's taken from default context.

Example 2: List flexible servers in specific resource group of a subscription

Get-AzPostgreSqlFlexibleServer -SubscriptionId aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e -ResourceGroupName example-resource-group-01
Name                                     ResourceGroupName                        Location             SkuName              SkuTier         AdministratorLogin        StorageSizeGb
----                                     -----------------                        --------             -------              -------         ------------------        -------------
example-server-01                        example-resource-group-01                Australia East       Standard_D4ads_v5    GeneralPurpose  adminlogin01              128
example-server-04                        example-resource-group-01                Southeast Asia       Standard_D4ads_v5    GeneralPurpose  adminlogin04              4096

Gets Azure Database for PostgreSQL flexible servers in subscription and resource group explicitly passed as arguments. If subscription is not passed explicitly, it's taken from default context.

Example 3: Get flexible server corresponding to specific name, resource group and subscription

Get-AzPostgreSqlFlexibleServer -SubscriptionId aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e -ResourceGroupName example-resource-group -Name example-server
Name                                     ResourceGroupName                        Location             SkuName              SkuTier         AdministratorLogin        StorageSizeGb
----                                     -----------------                        --------             -------              -------         ------------------        -------------
example-server                           example-resource-group                   Southeast Asia       Standard_D4ads_v5    GeneralPurpose  adminlogin                4096

Gets Azure Database for PostgreSQL flexible server with name, resource group, and subscription explicitly passed as arguments. If subscription is not passed explicitly, it's taken from default context.

Example 4: Get flexible server corresponding to specific resource identifier

$ID = "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/example-server"
Get-AzPostgreSqlFlexibleServer -InputObject $ID
Name                                     ResourceGroupName                        Location             SkuName              SkuTier         AdministratorLogin        StorageSizeGb
----                                     -----------------                        --------             -------              -------         ------------------        -------------
example-server                           example-resource-group                   Southeast Asia       Standard_D4ads_v5    GeneralPurpose  adminlogin                4096

Gets Azure Database for PostgreSQL flexible server with the specific resource identifier of the server, explicitly passed as an argument.

Parameters

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter

Parameter properties

Type:Microsoft.Azure.PowerShell.Cmdlets.PostgreSqlFlexibleServer.Models.IPostgreSqlFlexibleServerIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The name of the server.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ServerName

Parameter sets

Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubscriptionId

The ID of the target subscription. The value must be an UUID.

Parameter properties

Type:

String[]

Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

List1
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
List
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.Azure.PowerShell.Cmdlets.PostgreSqlFlexibleServer.Models.IPostgreSqlFlexibleServerIdentity

Outputs

Microsoft.Azure.PowerShell.Cmdlets.PostgreSqlFlexibleServer.Models.IServer