Azure / azure-cli

Azure Command-Line Interface
MIT License
4.02k stars 2.99k forks source link

Using Out-GridView #15891

Open B4Art opened 3 years ago

B4Art commented 3 years ago

[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.

yonzhan commented 3 years ago

account