PSRAFSCAN DOCUMENTATION
Run a PSRafScan Review
Review an existing PowerShell script path or clipboard content with the right intended use, FailOn threshold, report format, and output destination.
Direct answer
Choose one input
RSX -Path ./candidate.ps1 -IntendedUse Ps1File
RSX -Clipboard -IntendedUse TerminalPaste| Input | Use | Important boundary |
|---|---|---|
-Path | An existing script file | The path must resolve to a file. |
-Clipboard | Text already on the clipboard | The 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
| Value | Result code 1 when |
|---|---|
Any | Any Information, Warning, or Error finding is present. |
Warning | A Warning or Error finding is present. This is the direct-scan default. |
Error | An Error finding is present. |
None | Never 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.jsonRead 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.