# PowerShell/PSScriptAnalyzer

Download ScriptAnalyzer from PowerShellGallery

Repository: https://github.com/PowerShell/PSScriptAnalyzer
Canonical: https://ross.abutalabs.com/products/psscriptanalyzer
Homepage: https://www.powershellgallery.com/packages/PSScriptAnalyzer/
Language: C#
License: MIT
License Family: permissive
Topics: powershell, scriptanalyzer, linter, formatter, analyzer, powershell-gallery, hacktoberfest
Last push: 2026-08-26T17:33:42+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 43, longevity 100
- inputs: {"age_days": 4174, "days_push": 7, "days_rel": 166, "gap_med": 263.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2149, forks 413 (observed 2026-08-28T04:06:19.207701+00:00)

## What it is
PSScriptAnalyzer is a static code checker (linter and formatter) for PowerShell scripts and modules, maintained by the PowerShell team. It applies built-in and custom rules based on PowerShell best practices and reports diagnostics with suggested fixes.

## Use cases
- lint powershell scripts for best practice violations
- format powershell code automatically
- check powershell modules for uninitialized variables
- detect unsafe use of Invoke-Expression in scripts
- enforce powershell code style in CI pipelines
- write custom static analysis rules for powershell

## When to choose
- you write or maintain PowerShell scripts or modules and want automated quality checks
- you need consistent PowerShell formatting across a team or codebase
- you want to catch common PowerShell defects before shipping

## When to avoid
- you need linting for languages other than PowerShell
- you need dynamic runtime analysis or profiling rather than static checks

## Facets
- artifact type: library
- maturity: active
- function: linter, formatter, developer-tools
- domain: developer-tools
- platform: windows, cross-platform, cli
- tags: powershell, static-analysis, code-quality, best-practices, powershell-gallery, command-line, automation, linux, macos

## Member repositories
- PowerShell/PSScriptAnalyzer (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:19.207701+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:50:58.970594+00:00, confidence not recorded.
  - readme: https://github.com/PowerShell/PSScriptAnalyzer (fetched 2026-08-28T04:06:19.207701+00:00, sha 32743cb02091)
  - homepage: https://www.powershellgallery.com/packages/PSScriptAnalyzer/ (fetched 2026-08-29T10:30:47.516261+00:00, sha b0da5685ab61)
- Data as of 2026-08-30T08:39:29.467469+00:00.
