PSRAFSCAN DOCUMENTATION
PSRafScan CLI Reference
Reference PSRafScan commands, the RSX alias, scan inputs, intended-use values, thresholds, report options, catalog filters, and examples.
Commands
| Command | Purpose |
|---|---|
Invoke-PSRafScan | Run a guided scan, direct scan, catalog listing, or self-test. |
RSX | Alias for Invoke-PSRafScan. |
Get-PSRafScanRule | List and filter rule metadata. |
Get-PSRafScanSelfTest | List and filter self-test metadata. |
Invoke-PSRafScanSelfTest | Run the self-test suite and format the result. |
Direct scan parameters
| Parameter | Accepted value or behavior | Default |
|---|---|---|
Path | Existing file path; cannot be combined with Clipboard | None |
Clipboard | Use current clipboard text; cannot be combined with Path | Off |
IntendedUse | Ps1File or TerminalPaste | Ps1File |
FailOn | Any, Warning, Error, or None | Warning |
OutputFormat | PlainText or Json | PlainText |
OutputPath | Write the report to this path | Return the report |
HideInformationDetail | Reduce Information detail in PlainText | Off |
NoColor | Disable terminal color | Off |
NonInteractive | Prevent the guided flow | Off |
Catalog and self-test options
Use -SelfTest, -ListRules, -ListSelfTests, or -Help to select a non-scan operation. Catalog commands support filters for rule name, category, type, severity, intended use, tags, aliases, text, and lifecycle state.
RSX -ListRules -Tag git
Get-PSRafScanRule -Category CredentialSafety -Severity Warning
Get-PSRafScanSelfTest -RuleName UnapprovedVerb -TestKind Negative
RSX -SelfTest
RSX -HelpExamples
RSX -Path ./script.ps1 -IntendedUse Ps1File -FailOn Warning
RSX -Clipboard -IntendedUse TerminalPaste -FailOn Warning
RSX -Path ./script.ps1 -IntendedUse Ps1File -FailOn Error -OutputFormat Json -OutputPath ./result.jsonExit codes
Exit codes are 0 for pass, 1 when findings meet the selected threshold, and 2 for syntax errors.