PSScriptAnalyzer is a static code checker for PowerShell modules and scripts. PSScriptAnalyzer checks the quality of PowerShell code by running a set of rules. The rules are based on PowerShell best practices identified by PowerShell Team and the community. It generates DiagnosticResults (errors and warnings) to inform users about potential code defects and suggests possible solutions for improvements.
PSScriptAnalyzer ships with a collection of built-in rules that check various aspects of PowerShell code such as:
Invoke-Expression
You can choose the rules to include or exclude for your modules and scripts. PSScriptAnalyzer can also fix the formatting of your code. This helps you produce code that conforms to a standard style, is easier to read, and is more maintainable.
Installing PSScriptAnalyzerSupported PowerShell Versions and Platforms
Install using PowerShellGet 2.x:
Install-Module -Name PSScriptAnalyzer -Force
Install using PSResourceGet 1.x:
Install-PSResource -Name PSScriptAnalyzer -Reinstall
The Force or Reinstall parameters are only necessary when you have an older version of PSScriptAnalyzer installed. These parameters also work even when you don't have a previous version installed.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4