我只是尝试使用 Az PowerShell 提取以下信息。 Resource on portal
已经尝试过以下命令
Get-AzCloudService -ResourceGroupName "testCosmosDB" # it gives no result.
Get-AzCloudService -ResourceGroupName "testCosmosDB" -CloudServiceName "testnameon" # as shown below.
最佳答案
您收到此错误的原因是 Az
PowerShell 模块仅支持云服务(扩展支持),而不支持云服务(经典)。
您的一个选择是将经典云服务迁移到云服务(扩展支持)。您可以在此处了解有关迁移的更多信息:https://learn.microsoft.com/en-us/azure/cloud-services-extended-support/overview#migration-to-azure-resource-manager .
另一个选择(不确定是否可行)是使用真正旧版本的 Azure PowerShell(甚至在 AzureRM 之前),它支持经典资源。
关于azure - Az Powershell 命令不适用于 "Cloud service (classic)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69447826/