Forum Discussion
Gunter Danzeisen
Sep 12, 2019Brass Contributor
Force a refresh on the Security Policy
Hello there,
Is it possible to force a refresh on the Security Policy or a single recommendation once changes have been made to correct the security alert?
- Sep 16, 2019No force refresh capability, the scan interval is about 30 min for policy based recommendations.
Exedexes
Jul 22, 2022Copper Contributor
Gunter Danzeisen I had the same issue and found a powershell command that forces an Azure Policy Compliance Scan.
There are two options
Whole Subscription:
$job = Start-AzPolicyComplianceScan -AsJob
$job | Wait-Job
Single Resource Group:
$ResourceGroup = '%yourresourcegroup%'
$job = Start-AzPolicyComplianceScan -ResourceGroupName $ResourceGroup -AsJob
$job | Wait-Job
Hope this helps!