gpt4 book ai didi

azure - 如何在 Azure PowerShell 中获取所有资源参数详细信息

转载 作者:行者123 更新时间:2023-12-03 02:42:13 25 4
gpt4 key购买 nike

亲爱的,

我想知道如何获取特定资源的所有参数,“获取”命令无法获取所有详细信息!

例如,我需要获取此公共(public)IP地址的IP

Get-AzResource -Name "PubIP"

Name : PubIP
ResourceGroupName : RG1
ResourceType : Microsoft.Network/publicIPAddresses
Location : centralus
ResourceId : /subscriptions/xxxxxx/Microsoft.Network/publicIPAddresses/PubIP

我已经尝试过

Get-AzResource -Name "PubIP" | Where-Object { $_.Scope -contains 'address' }

但也没用!

最佳答案

您最好使用专用的 powershell cmdlet 来获取资源的详细信息。

例如,要获取公共(public)IP地址的详细信息,您可以使用Get-AzPublicIpAddress 。测试结果:

enter image description here

关于azure - 如何在 Azure PowerShell 中获取所有资源参数详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60536075/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com