# Quality

Quality: PSScriptAnalyzer: A Second Pair of Eyes, Testing with Pester.

Updated: November 10, 2026

1. [PSScriptAnalyzer: A Second Pair of Eyes](https://www.ask-codey.com/lessons/powershell-script-analyzer) (Journeyman): Invoke-ScriptAnalyzer reads a script or a whole module without running it and lists every likely problem with its rule, severity, line and message; the rules worth knowing ask for full command names, approved verbs, singular nouns, -WhatIf on commands that change things, results instead of Write-Host and no unused variables, and a settings file or SuppressMessageAttribute sets one aside on purpose.
2. [Testing with Pester](https://www.ask-codey.com/lessons/powershell-pester) (Freelancer): A Pester test file, named something.Tests.ps1, groups checks in Describe blocks, each It block runs your code and checks one answer with Should, and Invoke-Pester runs them all in seconds, marks each one passed or failed and says what it expected and what it got; TestDrive: gives every test a throwaway folder for its files.

Source: https://www.ask-codey.com/courses/powershell-in-depth/topics/powershell-quality
