Skip to main content

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 name
  • platform - Target platform (windows, mac, linux)
  • description - Script description
  • created_by - Creator email
  • modified_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.
Required Permission: 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 execute
  • group - All users with ‘Administrators’ role can execute
  • public - 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.
Required Permission: 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, linux
string
Updated permission level: private, group, or public
string
Updated script name.
string
Updated description.
string
Audit log comment for this modification. Max length: 4096 characters.
Required Permission: Real time response (admin): Write
Example: Update Script

Remove-FalconScript

Delete a custom Real-time Response script.
string
required
Script identifier to remove.
Required Permission: 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.desc
  • name.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.
Required Permission: Real time response (admin): Write
Example: Browse Library Scripts

Script Execution

Execute Custom Scripts with runscript

Use the runscript admin command to execute uploaded custom scripts.
Example: Execute Custom Script

Execute FalconScript Library Scripts

Use the falconscript 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

Security Considerations
  • Review all scripts before upload to prevent malicious code
  • Use private or group permissions for sensitive scripts
  • Include audit comments for all uploads and modifications
  • Test scripts in non-production environments first
  • Maintain version control for script changes
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