File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
includes/resource-graph/samples/bycat Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -123,15 +123,16 @@ Search-AzGraph -Query "PolicyResources | where type =~ 'Microsoft.PolicyInsights
123
123
Provides a list of all resources types that are in a ` NonCompliant ` state.
124
124
125
125
``` kusto
126
- PolicyResources
126
+ " PolicyResources
127
127
| where type == 'microsoft.policyinsights/policystates'
128
128
| where properties.complianceState == 'NonCompliant'
129
+ | extend NonCompliantResourceId = properties.resourceId, PolicyAssignmentName = properties.policyAssignmentName"
129
130
```
130
131
131
132
# [ Azure CLI] ( #tab/azure-cli )
132
133
133
134
``` azurecli-interactive
134
- az graph query -q "PolicyResources | where type == 'microsoft.policyinsights/policystates' | where properties.complianceState == 'NonCompliant'"
135
+ az graph query -q "PolicyResources | where type == 'microsoft.policyinsights/policystates' | where properties.complianceState == 'NonCompliant' | extend NonCompliantResourceId = properties.resourceId, PolicyAssignmentName = properties.policyAssignmentName "
135
136
```
136
137
137
138
# [ Azure PowerShell] ( #tab/azure-powershell )
You can’t perform that action at this time.
0 commit comments