---
name: psscriptanalyzer
description: "Use when adopting PSScriptAnalyzer to assess this standard: Check PowerShell scripts and modules"
---

# Apply PSScriptAnalyzer

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

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by PSScriptAnalyzer.
2. 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.
3. Record the tool version, configuration, scope and findings. Explain any checks that could not run.
4. Use the same invocation after changes and compare the evidence against the baseline.

Refer to [the upstream documentation](https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/overview) for configuration and prerequisites.

## Tool invocation

```
Invoke-ScriptAnalyzer -Path . -Recurse
```
