PowerShell Script Analyzer

The PowerShell Script Analyzer (PSScriptAnalyzer) module is a way to help administrative scripters check code against best practices.

https://4sysops.com/archives/powershell-script-analyzer-a-free-static-code-analysis-tool/

https://github.com/PowerShell/PSScriptAnalyzer