ScriptCop

ScriptCop is a module to help make sure your PowerShell scripts are following the rules

Download
ScriptCop is a tool to help make sure your scripts follow the rules.

ScriptCop performs static analysis on your PowerShell.

It doesn't run your code, but it examines your code for a set of well-known problems.

You can write custom rules in ScriptCop, but it comes with a number of pre loaded rules.
about scriptcop fixers
about ScriptCop Rules

Test-Command checks commands for consistency.

Test-Command run a series of static analysis rules on your script, and helps you see if there's anything to improve.

It will not run any script, just look at the information about the script, like it's help, command metadata, or the script content itself.

Gets all of the script cop rules, and the relative path to the file defining the rule

Gets the currently defined script cop patrols.

A Script Cop patrol groups a number of rules to help easily fix a set of issues.

Code Walkthrus

See each step online, and try it on your computer.