Exporting Non-Compliant Resources from Azure Policies

rmak75 1 Reputation point

Im trying to figure out a way to export the non-compliant resources from a specific Policy within ASC. I have tried the Get-AzPolicyState command but that does not give me the non-compliant resources within a policy.

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
601 questions
0 comments No comments
{count} votes

1 answer

Sort by: Oldest
  1. Rafael da Rocha 3,936 Reputation points

    Hello, you should be able to get results with something like this:

    Get-AzPolicyState -Filter "ComplianceState eq 'NonCompliant' and PolicySetDefinitionName eq 'your_policyset_definition_name'"  


    If any reply helped solve your question, please remember to upvote and/or "Accept Answer".
    It helps others facing similar issues find the solution.

    0 comments No comments