Share via

Programmatically trigger Azure policy remediation

MrFlinstone 761 Reputation points
2024-09-09T22:14:57.2533333+00:00

I have got azure policy auto remediation in place, however the process is a manual one where the remediation tasks needs to be manually triggered. I was wondering if there is a way to programmatically trigger the running of the remediation job.

Azure Policy
Azure Policy

An Azure service that is used to implement corporate governance and standards at scale for Azure resources.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Marcin Policht 92,630 Reputation points MVP Volunteer Moderator
    2024-09-09T23:39:41.5133333+00:00

    Yes - there is. Refer to

    https://learn.microsoft.com/en-us/powershell/module/az.policyinsights/start-azpolicyremediation?view=azps-12.3.0

    https://learn.microsoft.com/en-us/rest/api/policy/remediations?view=rest-policy-2021-10-01


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.