azure - Az Powershell 命令不适用于 "Cloud service (classic)"

标签 azure powershell azure-cloud-services

我只是尝试使用 Az PowerShell 提取以下信息。 Resource on portal

已经尝试过以下命令

Get-AzCloudService -ResourceGroupName "testCosmosDB" # it gives no result.
Get-AzCloudService -ResourceGroupName "testCosmosDB" -CloudServiceName "testnameon" # as shown below.

2nd command o/p

最佳答案

您收到此错误的原因是 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/

相关文章:

c# - 在 azure 上发布时列名无效

Azure 导入/导出工具 dataset.csv 和多个 session 文件夹

azure - Azure Linux VM 上的自定义端口连接被拒绝

shell - PowerShell:如何创建对象属性的引用

windows - 术语 'node' 无法识别...在 Powershell 中

azure - 如何让 New-AzureADPolicy 在 azure cloud shell 中工作

.net - GCP 工作负载与 Azure 联合身份验证

c# - "Write-Error"(在 Powershell 中编写,在 C# 中使用)有效但 Write-Debug 不起作用 - 为什么?

.net - 如何以编程方式获取云服务的事件实例名称?

azure - Azure 中自动扩展 Web 角色