Skip to content

June 2025 (version 1.45)#

Install with: GitHub Actions | Azure Pipelines | PowerShell


Welcome to the June 2025 release of PSRule for Azure. This release includes new features, new rules and improvements to existing rules.

See the change log or GitHub history for a complete list of changes.

Optimization to policy as rules#

Policy as rules performs additional optimization during export and code generation to improve performance and reduce complexity of generated rules.

First, this release also introduces native support for exporting policy assignments, removing the dependency on the Az.Resources PowerShell module. This provides:

  • Improved reliability — Direct integration with Azure REST APIs eliminates potential module compatibility issues.
  • Better performance — Streamlined export process with fewer dependencies and reduced overhead.
  • Enhanced maintainability — Simplified codebase with direct control over the export functionality.

Finally, the policy as rules code generation now includes several key optimizations:

  • Nested allOf/anyOf flattening — Deeply nested logical conditions are automatically flattened to reduce complexity and improve readability of generated rules.
  • Peer condition merging — Multiple conditions targeting the same field are merged where possible to create more efficient rule logic.
  • Condition inversion — Inverted conditions using not operators are automatically flattened where possible for better performance.

These optimizations result in more efficient, readable, and maintainable policy as rules implementations while reducing the complexity of the generated rule conditions.

Expanded detection for Azure Monitor#

This release adds new rules to detect opportunities for improving cost optimization of Azure Monitor resources. New rules check for:

  • Azure Monitor metric alerts that are configured to automatically mitigate issues.
  • Azure Monitor scheduled query alerts that are configured for lower frequency.

Thank you#

Thanks for your continued support and feedback. We are always looking for ways to improve the experience of using PSRule for Azure.

If you have any feedback or suggestions, please reach out to us on GitHub Discussions or GitHub Issues.

If you'd like to contribute to the project, please check out our contributing guide. We welcome contributions of all kinds, from rules, code, documentation, and samples.