Test a Command
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.

A script block containing functions, for instance: function foo {}. Script Blocks that do not contain functions will be ignored.

Rules to avoid running.

The name of the rule to run

The scriptcop 'patrol' (list of rules) to run