Choose an input

RSX -Path ./candidate.ps1 -IntendedUse Ps1File
RSX -Clipboard -IntendedUse TerminalPaste
PSRafScan inputs
InputUse
-PathReview an existing script file.
-ClipboardReview text currently on the clipboard.

Choose how the code will be used

Use Ps1File for a saved script and TerminalPaste for code that will be entered into a live terminal.

Set the threshold

FailOn values
ValueReturns 1 when
AnyAny Information, Warning, or Error finding is present.
WarningA Warning or Error finding is present.
ErrorAn Error finding is present.
NoneNever because of rule severity; parser errors still return 2.

Choose the report format

Use PlainText for a readable terminal report or Json for structured processing. OutputPath writes the report to a file.

RSX -Path ./candidate.ps1 -IntendedUse Ps1File -FailOn Warning -OutputFormat PlainText

RSX -Path ./candidate.ps1 -IntendedUse Ps1File -FailOn Warning -OutputFormat Json -OutputPath ./candidate.psrafscan.json

Read the results

  1. Fix parser errors first.
  2. Read every Error, Warning, and Information finding in its surrounding code.
  3. Use the issue and recommended change to plan a focused edit.
  4. Run the same scan again after editing.