Put it in a variable:
$a = (az account list-locations | ConvertFrom-Json)
List it into GridView:
$a | ogv
Select Name and Physical Location and put it in a variable:
$b = (az account list-locations | ConvertFrom-Json).ForEach({$_ | Select-Object -Property @{N='physicalLocation'; E={$_.metadata.physicalLocation}}, Name})
List that into GridView:
$b | ogv
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 9abfaa54-0895-29f7-f3bb-ff604912b2ac
Version Independent ID: d1ff3478-8a86-59e4-62ef-449900132a67
[Enter feedback here] To Convert a list of location into an Powershell Object list:
(az account list-locations | ConvertFrom-Json).ForEach({$_ | Select-Object -Property @{N='physicalLocation'; E={$_.metadata.physicalLocation}}, Name})
Put it in a variable:
$a = (az account list-locations | ConvertFrom-Json)
List it into GridView:
$a | ogv
Select Name and Physical Location and put it in a variable:
$b = (az account list-locations | ConvertFrom-Json).ForEach({$_ | Select-Object -Property @{N='physicalLocation'; E={$_.metadata.physicalLocation}}, Name})
List that into GridView:
$b | ogv
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.