This Article will help you know how to use Azure Policy Compliance Evaluator (PCE) tool which will help you evaluate your Policies on demand.
There has been a lot of situations where, after we have created a policy, we had to keep on waiting for the evaluation cycle to run on our Subscription for us to know which existing resources are compliant/non-compliant to the newly created Azure Policy, and as the evaluation cycle in Azure policy ran once in every 24 hours it made it to be a tedious and time-consuming process.
But with PCE gone are those days, where we have to keep on waiting for the Evaluation to happen but instead we will be able to get the policies evaluated on-demand.
The below steps will help us in downloading the PCE tool and evaluate the policies:
- Download the PCE ZIP file from here.
2. Extract the PCE ZIP file and open the folder to go to the PCE Application
3. Open Cmd and navigate to that folder and run the command:
If you want to run the evaluation at Subscription scope:
pce.exe -s "91897ffb-xxxx-xxxx-xxxx-4bb03c62ca8b"
If you want to run the evaluation at Resource Group scope:
pce.exe -s "91897ffb-xxxx-xxxx-xxxx-4bb03c62ca8b" -rg "<RG Name>"
The above steps will trigger the evaluation cycle and you will be able to check your compliant/non-compliant resources from the portal .