Overview
RTR Scripts enable you to upload, manage, and execute custom PowerShell, Bash, and Zsh scripts on endpoints through Real-time Response. Scripts provide repeatable, auditable automation for investigation and remediation tasks.Custom scripts require admin-level RTR permissions and are subject to permission controls (private, group, or public).
Script Management
Get-FalconScript
Search for custom Real-time Response scripts.string[]
Script identifier(s) to retrieve. Format:
{32-char-hex}_{32-char-hex}string
Falcon Query Language expression to filter results.Available filter fields:
name- Script nameplatform- Target platform (windows, mac, linux)description- Script descriptioncreated_by- Creator emailmodified_timestamp- Last modification time
string
Property and direction to sort results.
int32
default:"100"
Maximum number of results per request. Valid range: 1-100.
int32
Position to begin retrieving results for pagination.
switch
Retrieve detailed information including script metadata.
switch
Repeat requests until all available results are retrieved.
Real time response (admin): Write
Example: List All Scripts
Example: Search Scripts
Send-FalconScript
Upload a custom Real-time Response script.string
required
Path to local script file or string-based script content.Supported file types:
- PowerShell:
.ps1 - Bash/Zsh:
.sh
string[]
required
Operating system platform(s) where script can execute.Valid values:
windows, mac, linuxYou can specify multiple platforms if the script is compatible.string
required
Permission level controlling who can execute the script.
private- Only the creator can executegroup- All users with ‘Administrators’ role can executepublic- Both ‘Administrators’ and ‘Active Responders’ can execute
string
Script name for identification. Max length: 32766 characters.Defaults to filename if not specified.
string
Description of script purpose and functionality.
string
Audit log comment explaining the upload. Max length: 4096 characters.
Real time response (admin): Write
Example: Upload Investigation Script
Example: Cross-Platform Script
Edit-FalconScript
Modify an existing Real-time Response script.string
required
Script identifier to modify. Format:
{32-char-hex}_{32-char-hex}string
required
Path to updated script file.
string[]
Updated platform(s). Valid values:
windows, mac, linuxstring
Updated permission level:
private, group, or publicstring
Updated script name.
string
Updated description.
string
Audit log comment for this modification. Max length: 4096 characters.
Real time response (admin): Write
Example: Update Script
Remove-FalconScript
Delete a custom Real-time Response script.string
required
Script identifier to remove.
Real time response (admin): Write
Example: Delete Script
FalconScript Library
CrowdStrike provides pre-built scripts in the FalconScript library for common investigation and response tasks.Get-FalconLibraryScript
Search for scripts in the official FalconScript library.string[]
Library script identifier(s) to retrieve.
string
Falcon Query Language expression to filter results.
string
Property and direction to sort results.Valid values:
modified_timestamp.asc/modified_timestamp.descname.asc/name.desc
int32
default:"100"
Maximum number of results per request. Valid range: 1-500.
switch
Retrieve detailed information.
switch
Retrieve all available results.
Real time response (admin): Write
Example: Browse Library Scripts
Script Execution
Execute Custom Scripts with runscript
Use therunscript admin command to execute uploaded custom scripts.
Example: Execute Custom Script
Execute FalconScript Library Scripts
Use thefalconscript admin command for library scripts.
Example: Execute Library Script
Script Arguments
Pass parameters to scripts using the-Raw argument format.
Example: Script with Parameters
Advanced Script Workflows
1
Develop and Test Script Locally
Create and test your script before uploading.
check-registry-persistence.ps1
2
Upload Script
Upload to CrowdStrike with appropriate permissions.
3
Execute Across Fleet
Run the script on multiple hosts.
4
Update Based on Findings
Improve the script and update it.
Real-World Script Examples
Investigation: Network Connections
network-investigation.ps1
Remediation: Remove Persistence
remove-malware-persistence.ps1
Collection: Memory Analysis
memory-analysis.sh
Script Management Best Practices
Organization
- Use descriptive names that indicate script purpose
- Provide detailed descriptions including expected output
- Document required parameters in the description
- Tag scripts with version numbers in comments
- Remove obsolete scripts to reduce clutter
Batch Script Execution Pattern
Reusable Batch Script Execution
Troubleshooting
Script Execution Failures
Debug Script Execution
Common Issues
- Script not found: Verify script name matches exactly (case-sensitive)
- Permission denied: Check script PermissionType and your role
- Timeout: Increase timeout for long-running scripts
- Platform mismatch: Ensure script platform matches host OS
- Syntax errors: Validate script syntax before upload
Related APIs
- Real-time Response - Session management and read-only commands
- RTR Admin - Administrative commands for script execution