What is PSScriptAnalyzer?
mainPSScriptAnalyzer is a static code checker for PowerShell modules and scripts. It analyzes code quality by running a set of rules based on PowerShell best practices. It generates DiagnosticResults (errors and warnings) to identify potential defects and suggest improvements.
Built-in rules check for issues such as:
- Uninitialized variables
- Use of the
PSCredentialtype - Use of
Invoke-Expression