PSRule is an open-source, general-purpose rules engine built on top of PowerShell and maintained on GitHub.
PSRule provides an easy way to:
- Define reusable business rules like scripts.
- Validate PowerShell objects and infrastructure code.
Features of PSRule include:
- Extensible - Use PowerShell, a flexible scripting language.
- Cross-platform - Run on MacOS, Linux, and Windows.
- Reusable - Share rules across teams or organizations.
- Recommendations - Include detailed instructions to remediate issues.
This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates.
- For new issues, file your bug or feature request as a new issue.
- For help, discussion, and support questions about using this project, join or start a discussion.
Support for this project/ product is limited to the resources listed above.
You can download and install the PSRule module from the PowerShell Gallery.
|Module||Description||Downloads / instructions|
|PSRule||Validate infrastructure as code (IaC) and objects using PowerShell rules.||latest / instructions|
Visual Studio Code extension
You can download and install the companion extension for Visual Studio Code from the Visual Studio Marketplace. The extension is available to download in to release channels.
|Preview||More frequent releases but more likely to contain bugs.|
|Stable||Less frequent releases, with more user testing, experimental features are disabled.|
Azure DevOps extension
You can install the extension for Azure Pipelines from the Visual Studio Marketplace. This extension allows you to run PSRule analysis without having to use PowerShell directly.
|Extension||Description||Downloads / instructions|
|PSRule||Validate infrastructure as code (IaC) and DevOps repositories using Azure Pipelines.||latest / instructions|
You can use PSRule with in a workflow with GitHub Actions. This action allows you to run PSRule analysis without having to use PowerShell directly.
|Action||Description||Downloads / instructions|
|PSRule||Validate infrastructure as code (IaC) and DevOps repositories using GitHub Actions.||latest / instructions|
You can optionally download and install the following modules from the PowerShell Gallery.
|Module||Description||Version / downloads|
|PSRule.Rules.Azure||A suite of rules to validate Azure resources and infrastructure as code (IaC) using PSRule.|
|PSRule.Rules.Kubernetes||A suite of rules to validate Kubernetes resources using PSRule.|
|PSRule.Rules.CAF||A suite of rules to validate Azure resources against the Cloud Adoption Framework (CAF) using PSRule.|
|PSRule.Rules.GitHub||A suite of rules to validate GitHub repositories using PSRule.|
|PSRule.Rules.MSFT.OSS||A suite of rules to validate repositories against Microsoft Open Source Software (OSS) requirements.|