PSRAFSCAN DOCUMENTATION
Getting Started with PSRafScan
Install PSRafScan on Windows, macOS, or Linux with PowerShell 7.4 or later, confirm the module, and run your first script review.
Requirements
PSRafScan runs on PowerShell 7.4+ on Windows, macOS, and Linux. It does not require another PowerShell module.
Download PSRafScan
Open GitHub Releases, download the PSRafScan release archive, and extract the module folder.
Install the module
Copy the extracted PSRafScan folder into the user module directory for your operating system.
| Operating system | Location |
|---|---|
| Windows | $HOME\Documents\PowerShell\Modules |
| macOS | $HOME/.local/share/powershell/Modules |
| Linux | $HOME/.local/share/powershell/Modules |
Confirm the installation
RSX should resolve as the alias for Invoke-PSRafScan. The self-test command checks the installed rules and expected results.
Import-Module PSRafScan
Get-Command RSX
RSX -SelfTestRun your first review
Use TerminalPaste instead when the code will be entered directly into a PowerShell terminal.
RSX -Path ./script.ps1 -IntendedUse Ps1File -FailOn WarningUpdate or uninstall
To update, close sessions using PSRafScan, replace the installed module folder with the new release, and confirm the installation again in a fresh PowerShell session.
To uninstall, close sessions using the module and remove only the installed PSRafScan folder from your user module directory.
Troubleshooting
- If Import-Module cannot find PSRafScan, confirm the module folder is directly inside a directory listed in $env:PSModulePath.
- If downloaded-file marking or execution policy blocks import, inspect the file source and follow your organization's PowerShell policy.
- When reporting a problem, include the operating system, PowerShell version, host, module path, PSRafScan version, and exact error text.