简体   繁体   English

我正在尝试通过 powershell 在我的 Azure 订阅中获取所有 Postgre SQl 数据库的列表,但找不到查询

[英]I'm trying to get a list of all Postgre SQl Databases in my Azure subscription via powershell, but can't find a query for it

Do anyone know of if there is a way to do this or have any articles where something similar to this is done?有谁知道是否有办法做到这一点或有任何类似的文章完成?

You can use Get-AzPostgreSqlServer to list the Postgre SQl Databases in an Azure subscription.您可以使用Get-AzPostgreSqlServer列出 Azure 订阅中的 Postgre SQl 数据库。

# Install the Azure Az PowerShell module
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force

# Connect to Azure
Connect-AzAccount -Subscription {subscription id} -Tenant {tenant id}

# Install the Az.PostgreSql module
Install-Module -Name Az.PostgreSql -RequiredVersion 0.5.0

# List the Postgre SQl Databases in an Azure subscription
Get-AzPostgreSqlServer -SubscriptionId {subscription id}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM