Forum Discussion
NumBillniF
Nov 30, 2019Copper Contributor
Load Balancers Table view Azure CLI
Hi, I`m trying to pull the below table in Azure CLI or Powershell and I cant, this is the portal table information which it cant be exported to csv .... I`m working to get a script in place t...
hspinto
Microsoft
Dec 01, 2019NumBillniF the best Azure resource for this type of need is Azure Resource Graph. You can use it in the Azure Portal, by opening the Azure Resource Graph Explorer blade and run the query below. You can download the results as CSV.
resources
| where type =~ 'Microsoft.Network/loadBalancers'
| extend lbType = iif(isnull(properties.frontendIPConfigurations[0].properties.publicIPAddress), 'internal', 'public')
| project id, name, resourceGroup, location, lbType
You can also use Azure Resource Graph from CLI. Learn more about it here.