convertto-json fails on result from Get-AzDiagnosticSetting
The user reported an issue of Convertto-json cmdlet.
Here is the details. Please take a loot at it.
Dominic Perreault commented
Same thing with many AzModule items. Here are samples i already encountered that fails:
Get-AzAutoScaleSetting -ResourceGroupName rg -Name name | ConvertTo-Json
Get-AzMetricAlertRuleV2 -ResourceGroupName rg -Name name | ConvertTo-Json
On call to Get-AzMetricAlertRuleV2 if i add a selec-object like below, it gets to work... but not on AutoScale
Get-AzMetricAlertRuleV2 -ResourceGroupName rg -Name name | Select-Object -Property * | ConvertTo-Json
Why does some calls works by adding Select-Object and others dont. Please make this consistent.