PSRAFSCAN DOCUMENTATION
Run a PSRafScan Review
Review a saved PowerShell script or clipboard content with the intended-use mode, severity threshold, report format, and output you need.
Choose an input
RSX -Path ./candidate.ps1 -IntendedUse Ps1File
RSX -Clipboard -IntendedUse TerminalPaste| Input | Use |
|---|---|
-Path | Review an existing script file. |
-Clipboard | Review 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
| Value | Returns 1 when |
|---|---|
Any | Any Information, Warning, or Error finding is present. |
Warning | A Warning or Error finding is present. |
Error | An Error finding is present. |
None | Never 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.jsonRead the results
- Fix parser errors first.
- Read every Error, Warning, and Information finding in its surrounding code.
- Use the issue and recommended change to plan a focused edit.
- Run the same scan again after editing.