Analyzing scripts with the built-in preset rulesets

suggest change

ScriptAnalyzer ships with sets of built-in preset rules that can be used to analyze scripts. These include: PSGallery, DSC and CodeFormatting. They can be executed as follows:

PowerShell Gallery rules

To execute the PowerShell Gallery rules use the following command:

Invoke-ScriptAnalyzer -Path /path/to/module/ -Settings PSGallery -Recurse

DSC rules

To execute the DSC rules use the following command:

Invoke-ScriptAnalyzer -Path /path/to/module/ -Settings DSC -Recurse

Code formatting rules

To execute the code formatting rules use the following command:

Invoke-ScriptAnalyzer -Path /path/to/module/ -Settings CodeFormatting -Recurse

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents