Direct answer

Choose one input

RSX -Path ./candidate.ps1 -IntendedUse Ps1File
RSX -Clipboard -IntendedUse TerminalPaste
PSRafScan scan inputs
InputUseImportant boundary
-PathAn existing script fileThe path must resolve to a file.
-ClipboardText already on the clipboardThe text is materialized to a temporary .ps1 file. Current source does not prove automatic cleanup.

Set intended use

Use Ps1File for source meant to remain a saved script. Use TerminalPaste for source meant to be entered directly in a terminal. Do not scan in one mode and assume the result fully describes the other.

Set FailOn

FailOn values
ValueResult code 1 when
AnyAny Information, Warning, or Error finding is present.
WarningA Warning or Error finding is present. This is the direct-scan default.
ErrorAn Error finding is present.
NoneNever because of custom-rule severity; parser errors still return 2.

Choose report format and destination

The format values are exactly PlainText and Json. HideInformationDetail affects detailed Information output in plain text. NoColor controls terminal color where applicable.

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 result without overreading it

  • Start with parser errors.
  • Review Error, Warning, and Information findings in their surrounding code.
  • Remember that FailOn controls the process result, not which findings exist.
  • Treat reports as potentially sensitive because matched source text and the script path can appear.
  • A pass is not a safety, correctness, or production-readiness guarantee.