GS/BS
← Standards directory
Code quality

PSScriptAnalyzer.

Check PowerShell scripts and modules

Validate cmdlet usage, parameter conventions and selected reliability rules. Run the same settings against scripts and modules before publishing.

PowerShell

Community rubric · v1

The evidence

Evidence coverage3 / 8
3 supported · 5 unresolved

One point for each verified check. Unknown means we still need evidence. Contrary evidence records an observed result that goes against the criterion.

Latest evidence review ·

  • Definition

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can two readers identify the same obligation? Contribute evidence ↗

  • Measurement

    Verified

    Invoke-ScriptAnalyzer emits one DiagnosticRecord per rule violation; -SuppressedOnly returns a different record type.

    Cited source ↗
  • Conformance

    Unknown

    No reviewed evidence is recorded for this dimension.

    What would demonstrate a violation? Contribute evidence ↗

  • CI enforcement

    Verified

    The -EnableExit flag writes a process exit status derived from diagnostics, a mode Microsoft explicitly recommends for CI.

    Cited source ↗
  • Getting started

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can a newcomer complete a first run? Contribute evidence ↗

  • Real-world adoption

    Verified

    CodeRabbit checks .ps1 scripts, .psm1 modules and .psd1 manifests with PSScriptAnalyzer in its review integration.

    Cited source ↗
  • Agent guidance

    Unknown

    No reviewed evidence is recorded for this dimension.

    Can an agent act on a specific finding? Contribute evidence ↗

  • Agent portability

    Unknown

    No reviewed evidence is recorded for this dimension.

    Does the practice work in two agent harnesses? Contribute evidence ↗

Use this standard

Run the check with the tool installed and configured for your project.

Invoke-ScriptAnalyzer -Path . -Recurse

Agent prompt

Use PSScriptAnalyzer in this repository to meet this standard: Check PowerShell scripts and modules. Validate cmdlet usage, parameter conventions and selected reliability rules. Run the same settings against scripts and modules before publishing. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
Read the agent skill ↗

Primary source

PSScriptAnalyzer documentation ↗