在 PowerShell 中执行 Get-AzContainerGroup 返回空表格。

huangapple go评论60阅读模式
英文:

Executing Get-AzContainerGroup in powershell returns empty table

问题

在一些基本教程的指导下,我已经通过Azure门户网站创建了Azure容器实例。现在,我想要能够使用Windows PowerShell获取此容器实例。

当我通过Windows PowerShell连接到我的Azure帐户并运行以下命令时:

Get-AzContainerGroup

我会得到以下结果:

在 PowerShell 中执行 Get-AzContainerGroup 返回空表格。

这基本上是一个空表格,与我预期的不同(以下是来自Get-AzContainerGroup Microsoft文档页面的示例输出):

在 PowerShell 中执行 Get-AzContainerGroup 返回空表格。

当我尝试调试该命令时,我没有收到任何错误,而且在响应正文中,我实际上可以看到关于特定容器实例的所有信息,但结果表格什么都没有显示,并且具有与示例输出不同的列。

容器实例是使用Microsoft准备的一个快速映像创建的:

mcr.microsoft.com/azuredocs/aci-helloworld:latest

并且设置为私有网络(这可能是原因吗?)

对于容器创建的那个资源组,我拥有贡献者权限。

我是否漏掉了一些其他重要的要点,以获取这个空表格结果,而不是正确列出我的一个运行中的容器实例的表格?

英文:

Following some basic tutorials I have created azure container instance via azure portal web. Now I want to be able to get this container instance using windows powershell.

When I connect to my azure account via windows powershell and run following command

Get-AzContainerGroup

I get the this result

在 PowerShell 中执行 Get-AzContainerGroup 返回空表格。

Which is basically empty table moreover different from the one I'd expected (follows example output from Get-AzContainerGroup microsoft documentation page)

在 PowerShell 中执行 Get-AzContainerGroup 返回空表格。

When I tried to debug the command, I got no errors and moreover in the response body I can actually see all information about that particular container instance, but the result table shows nothing and has different columns than the example output.

The container instance was created using one of the prepared microsoft quick images

mcr.microsoft.com/azuredocs/aci-helloworld:latest

and is set to be on private network (could this be reason?)

For that particular resource group the container was created in I have the contributor rights.

Am I missing some other important point to get this empty table result instead of correct table listing my one running container instance ?

答案1

得分: 0

以下是已翻译的内容:

尝试执行以下命令:

获取 Azure 容器组 -Name -ResourceGroupName | 格式化为列表
(或)

获取 Azure 容器组 | 格式化为列表
(或)

获取 Azure 容器组 -Name -ResourceGroupName | 选择对象 名称,操作系统类型,SKU

示例输出:

在 PowerShell 中执行 Get-AzContainerGroup 返回空表格。

英文:

Can you try out below commands:

Get-AzContainerGroup -Name <containerName> -ResourceGroupName <RGName>| Format-List
(or)

Get-AzContainerGroup | Format-List
(or)

Get-AzContainerGroup -Name <containerName> -ResourceGroupName <RGName> | select-object Name , OSType , SKU

Example Output:

在 PowerShell 中执行 Get-AzContainerGroup 返回空表格。

huangapple
  • 本文由 发表于 2023年6月1日 07:00:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76377762.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定