共用方式為


Get-AzPostgreSqlServer

取得伺服器的相關信息。

語法

List1 (預設值)

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

Get

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

List

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

GetViaIdentity

Get-AzPostgreSqlServer
    -InputObject <IPostgreSqlIdentity>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

取得伺服器的相關信息。

範例

範例 1:取得具有預設內容的 PostgreSql 伺服器

Get-AzPostgreSqlServer
Name                        Location AdministratorLogin Version StorageProfileStorageMb SkuName   SkuTier        SslEnforcement
----                        -------- ------------------ ------- ----------------------- -------   -------        --------------
postgresqltestserver        eastus   pwsh               9.6     5120                    GP_Gen5_4 GeneralPurpose Enabled

此 Cmdlet 會取得具有預設內容的 PostgreSql 伺服器。

範例 2:依資源群組和伺服器名稱取得 PostgreSql 伺服器

Get-AzPostgreSqlServer -ResourceGroupName PostgreSqlTestRG -Name PostgreSqlTestServer
Name                 Location AdministratorLogin Version StorageProfileStorageMb SkuName   SkuTier        SslEnforcement
----                 -------- ------------------ ------- ----------------------- -------   -------        --------------
postgresqltestserver eastus   pwsh               9.6     5120                    GP_Gen5_4 GeneralPurpose Enabled

此 Cmdlet 依資源群組和伺服器名稱取得 PostgreSql 伺服器。

範例 3:列出指定資源群組中的所有 PostgreSql 伺服器

Get-AzPostgreSqlServer -ResourceGroupName PostgreSqlTestRG
Name                        Location AdministratorLogin Version StorageProfileStorageMb SkuName   SkuTier        SslEnforcement
----                        -------- ------------------ ------- ----------------------- -------   -------        --------------
postgresqltestserver        eastus   pwsh               9.6     5120                    GP_Gen5_4 GeneralPurpose Enabled

此 Cmdlet 會列出指定資源群組中的所有 PostgreSql 伺服器。

範例 4:依身分識別取得 PostgreSql 伺服器

$ID = "/subscriptions/<SubscriptionId>/resourceGroups/PostgreSqlTestRG/providers/Microsoft.DBforPostgreSQL/servers/postgresqltestserver"
Get-AzPostgreSqlServer -InputObject $ID
Name                 Location AdministratorLogin Version StorageProfileStorageMb SkuName   SkuTier        SslEnforcement
----                 -------- ------------------ ------- ----------------------- -------   -------        --------------
postgresqltestserver eastus   pwsh               9.6     5120                    GP_Gen5_4 GeneralPurpose Enabled

此 Cmdlet 清單會依身分識別取得 PostgreSql 伺服器。

參數

-DefaultProfile

DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。

參數屬性

類型:PSObject
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzureRMContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

參數屬性

類型:IPostgreSqlIdentity
預設值:None
支援萬用字元:False
不要顯示:False

參數集

GetViaIdentity
Position:Named
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Name

伺服器的名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:伺服器名稱

參數集

Get
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ResourceGroupName

資源群組的名稱。 名稱不區分大小寫。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Get
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
List
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-SubscriptionId

目標訂用帳戶的標識碼。

參數屬性

類型:

String[]

預設值:(Get-AzContext).Subscription.Id
支援萬用字元:False
不要顯示:False

參數集

List1
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
Get
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
List
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters

輸入

IPostgreSqlIdentity

輸出

IServer