Azure / Azure/azure-cli

Using Out-GridView

Open
#15,891 1 comment 0 reactions 1 assignee Claimed by @jiasli View on GitHub
Account act-identity-squad feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

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

* ID: 9abfaa54-0895-29f7-f3bb-ff604912b2ac
* Version Independent ID: d1ff3478-8a86-59e4-62ef-449900132a67
* Content: [az account](https://docs.microsoft.com/en-us/cli/azure/account?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/account.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/account.yml)
* Service: **azure**
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.