# PoshCode/PowerShellPracticeAndStyle

The Unofficial PowerShell Best Practices and Style Guide

Repository: https://github.com/PoshCode/PowerShellPracticeAndStyle
Canonical: https://ross.abutalabs.com/products/powershellpracticeandstyle
Homepage: https://poshcode.gitbooks.io/powershell-practice-and-style
License: NOASSERTION
License Family: other
Topics: best-practices, powershell, style-guide, powershell-practices, powershell-community, conventions
Last push: 2023-05-19T02:50:39+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4568, "days_push": 1202, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2427, forks 295 (observed 2026-08-28T04:06:50.890179+00:00)

## What it is
An unofficial community-maintained best practices and style guide for PowerShell, published as a GitBook and licensed under CC BY-SA 4.0. It covers code layout, function structure, naming conventions, error handling, security, and building reusable tools.

## Use cases
- how should I format my PowerShell scripts
- PowerShell naming conventions for functions and variables
- best practices for writing reusable PowerShell modules
- how to handle errors in PowerShell scripts
- PowerShell style guide for team code reviews
- how to structure PowerShell functions and comment-based help

## When to choose
- you want community consensus guidelines for writing readable, maintainable PowerShell
- you are defining a team coding standard for PowerShell scripts and modules
- you are learning PowerShell and want to avoid common pitfalls

## When to avoid
- you need an automated linter rather than prose guidelines (use PSScriptAnalyzer)
- you need official Microsoft documentation or normative rules
- you need style guidance for a different shell or language

## Facets
- artifact type: learning-resource
- maturity: maintenance
- function: documentation, developer-tools
- domain: developer-tools, programming-languages, tutorials
- platform: cross-platform, windows
- tags: powershell, style-guide, best-practices, coding-conventions, community-guide, automation, linux, macos

## Member repositories
- PoshCode/PowerShellPracticeAndStyle (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:50.890179+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:31:35.222835+00:00, confidence not recorded.
  - readme: https://github.com/PoshCode/PowerShellPracticeAndStyle (fetched 2026-08-28T04:06:50.890179+00:00, sha 46df2e958a42)
  - homepage: https://poshcode.gitbooks.io/powershell-practice-and-style (fetched 2026-08-29T10:13:15.437214+00:00, sha dfc15699daec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
