Invoke-ScriptAnalyzer
noun
say it: “in-VOHK SKRIPT AN-uh-ly-zer” /ɪnˈvoʊk ˈskrɪpt ˈænəˌlaɪzɚ/
A PowerShell command that checks a script or module for likely mistakes and risky habits, without running it.
What does Invoke-ScriptAnalyzer do?
Invoke-ScriptAnalyzer reads a script or module, without running it, and lists what looks wrong or risky: each finding's rule name, how serious it is, the line and a message. -Recurse checks a whole folder.
Invoke-ScriptAnalyzer -Path .\PlaylistTools\PlaylistTools.psm1
In a sentence
- “Sam runs Invoke-ScriptAnalyzer before sharing a module.”
- “Invoke-ScriptAnalyzer flagged the alias sort and the unused variable.”
Level: Journeyman · More PowerShell terms at this level
Updated