When I run the command below
az group show --resource-group $GroupName
I get a line-by-line JSON describing the resource group with each property neatly indented and placed on each own row. Then, when I store the output into a variable and print it like this
$GroupDetails = az group show --resource-group $GroupName
Write-Host $GroupDetails
the contents of the JSON are scrambled into a single-line content. However, it's not that the formatting as such is gone because I still see a larger spacing in front of each property's name: the indenting is still there, only the line-breaks are ignored.
How can I store/print the value in a pretty manner?