首页 > 解决方案 > 在 Azure PowerShell 中将输出设置为表格格式而不是 json

问题描述

在 Azure PowerShell 中,json 格式有时很烦人。需要向后滚动并解密。

如何将所有 az 命令的默认值更改为 --output 表?

标签: azurepowershellazure-powershell

解决方案


在 Azure powershell 中,键入以下命令 - 将默认输出更改为表

az configure

它会提示您以下问题。选择 3

Do you wish to change your settings? (y/N): y

What default output format would you like?
 [1] json - JSON formatted output that most closely matches API responses.
 [2] jsonc - Colored JSON formatted output that most closely matches API responses.
 [3] table - Human-readable output format.
..
Please enter a choice [Default choice(1)]: 3

这适用于不喜欢默认 json 格式的用户


推荐阅读