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

How to get all resource parameters details in Azure PowerShell

亲爱的,

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

例如,我需要获取这个PublicIP地址

的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。测试结果: